How would I go about adding Opil crystals to all island worlds?
I'd like to do this because I feel like the Phidi shouldn't be the only species to benefit from the increased influence from Opil crystals, not to mention the financial boon.
Adding Opil
Re: Adding Opil
It should be noted that I am not a programmer, and I'm also not a very good modder xP
- sven
- Site Admin
- Posts: 1621
- Joined: Sat Jan 31, 2015 10:24 pm
- Location: British Columbia, Canada
- Contact:
Re: Adding Opil
I don't have the code in front of me right now, but, off the top of my head...RanDumGai wrote:How would I go about adding Opil crystals to all island worlds?
The easiest option is probably to just write a for loop over the all_planets list that adds the opil special to any planet with the 'Island' type. There are lot of places where you could put a for loop like that and have it work -- anytime in new_galaxy() after init_all_stars() has been called should work.
But, for testing purposes, you could actually write that loop outside any function (say at the bottom new_galaxy.lua), and it would be called implicitly while you where playing. That would make it easier to debug the logic (because then you won't have to re-run galaxy generation anytime you want to test your code snippit).