I think a more spies one would be nice. I looked around Steam and didn't find one BNW compatible, so if anyone here could point me to one that'd be great.
Thanks Whoward, as always, your DLL is great, but...
I was trying to write a code taking as model others I use but none of those functions has technology between their arguments, I'm a bit confused... any help would be appreciated...
GameEvents.PlayerCanBuild.Add(function(iPlayer, _, _, _, iBuild)
if (iBuild == GameInfoTypes.BUILD_WHATEVER) then
-- if iPlayer has the tech that makes the build/improvement obsolete, return false
end
return true
end)
Either this makes no sense, or you're going to have to explain this better. Through the whole game they can only build one type of unit? Or only gift one type of unit? Either way, how would you deal with prerequisites? If their unit was e.g., the panzer, either they have panzers in the ancient era or they have no units at all...I've got an idea for a really simple mod. Basically it allows military city states to build there unique units, that's it nothing else. I'm aware I could probably do this own my own, but considering the fact that I'm having trouble trying to add a new components for a civilization on ModBuddy. It's not coming out any time soon.
Either this makes no sense, or you're going to have to explain this better. Through the whole game they can only build one type of unit? Or only gift one type of unit? Either way, how would you deal with prerequisites? If their unit was e.g., the panzer, either they have panzers in the ancient era or they have no units at all...
He wants a mod that lets militaristic city-states build their unique units respectively to their 'secret' gift to civilizations, so a city-state that has the 'secrets' of the longbowman implies that the city-state can also construct the longbowman themselves.So it seems as if I haven't made myself clear. Ok so what happens is if a military city state has a unique unit, (which the always do). Say the ballista, like Rome the ballista replaces the catapult and instead of that city state building catapults, they build ballistas. They can still gift the unique unit, but now they can also build it. Just makes more sense in my own mind, if you know the secrets to building something why wouldn't you build it? Especially if it is a military invention.
Player.CanTrain (If we can detect if this player is a city-state and militaristic)
City.CanTrain (If we can detect the city's name that is)
He wants a mod that lets militaristic city-states build their unique units respectively to their 'secret' gift to civilizations, so a city-state that has the 'secrets' of the longbowman implies that the city-state can also construct the longbowman themselves.
My theory is with "dummy" units to avoid any external mod conflict that modifies preexisting units and then we can test using two LUA functions:
orCode:Player.CanTrain (If we can detect if this player is a city-state and militaristic)
Code:City.CanTrain (If we can detect the city's name that is)