Greetings, I was working on a delay counter for when other species sent "offer_to_join_empire" reuqest, and even after rejected, will keep repeat same request every turn after.
It sorta worked but didn't take note for 'other' species, or in new game in same session of same species that had sent offer before, bizzare but possible.
So, I'm curious if anyone know if there's this variable [map seed]? So I can put it in a local array of MapSeed, Race, OfferYear, OfferTurn to stop 'nagging' offers.
Is there a [Map Seed] value?
- sven
- Site Admin
- Posts: 1621
- Joined: Sat Jan 31, 2015 10:24 pm
- Location: British Columbia, Canada
- Contact:
Re: Is there a [Map Seed] value?
There's is a map seed of the sort you're looking for, it's stored in "galaxy.base_year_seed". But what you probably want to do for a hack like this is to add a variable to one of the "game state" tables. You could, for example, make a new array that's part of "galaxy", which is a global table that stores all sorts of galaxy info. Or you could write something right to the "empire" table of the empire you want to inhibit offers for. In general, you can always add new fields to any of the game state objects without getting in trouble -- the only potential problem is if you pick a field name that I'm already using for something else. But as long as you use a descriptive name, you should be safe from that. I'd just initialize a new table with some code like this, and then use it for whatever:Jem wrote:So, I'm curious if anyone know if there's this variable [map seed]? So I can put it in a local array of MapSeed, Race, OfferYear, OfferTurn to stop 'nagging' offers.
Code: Select all
if not galaxy.jems_table
galaxy.jems_table={}
end
local jems_table=galaxy.jems_table
<do whatever>
Re: Is there a [Map Seed] value?
Wow! Thank you kindly for the info!
I didn't know abt any of those. This sure opens up new ideas for me.
I didn't know abt any of those. This sure opens up new ideas for me.