Modding Strategic Resources Discussion

Figured it'd be useful to have a thread dedicated to what we know about Strategic resources, and how we can mod them - spawn frequencies, outputs, getting the AI to use them etc.

 

I've been trying to add a new Strategic Resource or two. This appears to require modding the Schema (or else you just get 'new resource not enumerated' errors); but the schema mods also do not appear to work in the mod directory.

 

Does anyone have any ideas?

6,451 views 4 replies
Reply #1 Top


but the schema mods also do not appear to work in the mod directory.
End of quote

Do schema mods work at all? I've not tried it for resources, but as far as I can tell changing the schema files when trying to add a new ship role makes no difference whatsoever to whether or not the new ship role will appear in game, whether you alter the core files or copies thereof.

Reply #2 Top

Quoting joeball123, reply 1



but the schema mods also do not appear to work in the mod directory.



Do schema mods work at all? I've not tried it for resources, but as far as I can tell changing the schema files when trying to add a new ship role makes no difference whatsoever to whether or not the new ship role will appear in game, whether you alter the core files or copies thereof.

End of joeball123's quote

 

Well, it seems to do something if you tweak the core files - I managed to completely break the game by changing the schema mods in the base directory, and adding a schema folder in the mod folder doesn't appear to do anything. Interestingly, it seemed to deactivate the error checking; the game was happy to let me into the menu, but wouldn't let me generate a map.

Reply #3 Top

Hmm, dunno about creating entirely new resources. The ones that exist have issues though; I took a look at spawn mechanics and each one is different.

 

You can alter the spawn rate through the MapSetupDefs.xml file, and I've had a go at rebalancing them a bit here:

https://forums.galciv3.com/467186/page/1/#3563270

 

The AI currently can't use Strategic Resources (except for Tiny ships and on planets) until the Age of Ascension because of some coding errors in ComponentClassDefs.xml 

I've fixed those issues here: https://forums.galciv3.com/467065/page/1/#3562130 

 

If you want to get the AI to use some new strategic resource you've created, all you have to do is give them a blueprint to do so.

Reply #4 Top

Yeah, I've been fiddling with them for the insane-abundant balance mod and it seems that the AI is actually able and willing to use resources fairly sensibly, provided that the blueprints have been provided. It will even trade for them when you set all hulls to require durantium, though it's struggling a little with correctly prioritizing mining starbases - it seems to be very fond of building the first one or two and then doesn't do many more. Might try tweaking constructor strategy rate up a bit. But in general I think we can mod resources a fair bit without the AI freaking out and sitt9ng in a hole.