• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

LUA - Generate resource from the list When City and building is built

Zhanbota

Chieftain
Joined
May 27, 2022
Messages
1
Hello, everyone!

Could someone help me with lua? I want to generate resources like cloves, pepper and nutmeg for Indonesia like it does on Vox Populi. But no matter how many times I've tried I can't get the hang of it. Please, help me to generate resources from the list when city is built and BUILDING_CANDI is built.


Thank you in advance.

Moderator Action: Moved to the main C&C forum as that is where questions are best answered. leif
 
Last edited by a moderator:
What have you tried? Can you attach the built mod? Is lua.log throwing any errors?

Also, you want to generate resources both when the city is built or when a Candi is built?
  • So a city can generate resources twice? (Or really an arbitrary amount of times if you keep selling and rebuilding the Candi?)
  • Is the resource from the Candi supposed to overwrite the resource from founding the city? (Since they get placed on the city tile itself, and a tile can't have two resources simultaneously)
  • Is the Candi supposed to have the same restriction as Indonesia's UA where these resources only get generated on landmasses other than the one where Indonesia spawned?
I think you'll need to be more specific about what you're asking the Lua script to do.
 
Back
Top Bottom