I don't even know how to reply to anything like that.
If you post your script (or email it to me) I would probably be able to spot the error. Otherwise there are some suggestions for conversion in this thread.
from PyScenario import *
from Consts import *
Trigger("Hanging Gardens Check").date(-500).built(121)
Trigger("Hanging Gardens Spawn").date(-500).fired("Hanging Gardens Check",bFired=False).target(76,40).buildings(121)
Trigger().date(-600).check(ePlayer=3).owned(tCoords=76,40,eOwner=3).built(eBuilding=BUILDING_HANGING_GARDEN,iNum=0).buildings(BUILDING_HANGING_GARDEN)
eHangingGarden = eIndex("building", "Hanging Garden")
If you wanna use he actual building type, then you need to do the entire "BuildingTypes.BUILDING_HANGING_GARDEN". You can alternatively use Rhye's constant from Consts.py: iHangingGarden but you could also could also define your own variable and use that instead:
Code:eHangingGarden = eIndex("building", "Hanging Garden")
Trigger("GardenTrigger").date(-600).check(ePlayer=3).owned(tCoords=(76,40),eOwner=3).built(eBuilding=121,iNum=0)
Trigger("GardenSpawn").fired("GardenTrigger").target(76,40).buildings(121)
Almost. The first Trigger wont work as intended because the Trigger will be looking for a Hanging Gardens in Babylon - not anywhere on the map.So, my script should look like this?
Trigger("GardenTrigger").date(-600).check(ePlayer=3).owned(tCoords=(76,40),eOwner =3).built(eBuilding=121,[COLOR="Red"]iNum=0[/COLOR])
Trigger("Garden built?").date(-600).built(121)
Trigger("Spawn Garden").fired("Garden built?",[COLOR="Red"]False[/COLOR]).player(3).check().date(-600).target(76,40).owned().buildings(121)
Trigger("Garden built?").date(-600).built(121,0)[COLOR="Red"].operator(2)[/COLOR]
Trigger("Spawn Garden").fired("Garden built?").player(3).check().target(76,40).owned().buildings(121)
Almost. The first Trigger wont work as intended because the Trigger will be looking for a Hanging Gardens in Babylon - not anywhere on the map.
And this won't work because the method will then look for zero or above instances of the building:
This should work (but you might wanna test it instead of just taking my word for it):
Or perhaps:Code:Trigger("Garden built?").built(121) Trigger("Spawn Garden").fired("Garden built?",[COLOR="Red"]False[/COLOR]).player(3).check().date(-600).target(76,40).owned().buildings(121)
Code:Trigger("Garden built?").built(121,0)[COLOR="Red"].operator(2)[/COLOR] Trigger("Spawn Garden").fired("Garden built?").player(3).check().date(-600).target(76,40).owned().buildings(121)
The way I originally designed PyScenario was that there are only global tile targets. So if you define a target tile anywhere in a Trigger it applies to all methods. Like it or not, but this is how it works...Why? I thought that tCoords=(76,40) would apply only to the built condition. I included no global target tile in the first trigger...
PyScenario is really just Python coding, and your suggestion simply doesn't make any sense in Python. Sorry.Hey, I know that programming changes are easier to suggest and harder to make than simply learning how to use PyScenario correctly, but would you be at all offended if I humbly suggested some enhancements to your wonderful tool? For example, adding ">" and "<" options to certain functions in addition to the classic "="?
I actually messed my own code up, so you might wanna look at the updated version. And test it, as I might have overlooked something...Domo arigato. I like the first one, because I'll never remember what .operator(2) does.
PyScenario is really just Python coding, and your suggestion simply doesn't make any sense in Python. Sorry.
Just stop with the whining and learn Python instead. Its a high-level programming language that lets you do all the logic you'd ever wanna do.
Trigger("Stonehenge").date(-3000).player(31).target(51,53).valid().city(51,53,"Stonehenge",1).buildings(118)
Trigger("HagiaCheck").built(126)
Trigger("HagiaSpawn").date(537).fired("HagiaCheck",False).owned(68,45).check().faith(1).buildings(126)
Your city parameters are correct. Also, you don't need to specifcy a target() trigger since you're specifying the city's location in the city() trigger![]()
I'm actually floored by the sheer determination and dedication you have for modding.I'm sorry, but I just can't be arsed to learn a whole new set of tools and a whole computer language every time I want to mod a game.
Yes. And killerkebab is right - you don't need to define a tile twice in the same Trigger:Anyway, I'd like to know whether I'm using the iX and iY parameters in the .city method correctly:
Trigger("Stonehenge").date(-3000).player(31).target([COLOR="Red"]51,53[/COLOR]).valid().city([COLOR="Red"]51,53[/COLOR],"Stonehenge",1).buildings(118)
Trigger("Stonehenge")[COLOR="Red"].startup(bLateStart=False)[/COLOR].player(31).target([COLOR="Red"]51,53[/COLOR]).city([COLOR="Red"]51,53[/COLOR],"Stonehenge",1).buildings(118)
This is correct... It never dawned on me to check cities for religions present. I'll have to be get back to you on this. But otherwise you could also spread Christianity to the city with the same Trigger, which would probably make sense:EDIT: another question. Is there any way to check the presence or absence of a certain religion in a city? i.e., can I make the Hagia Sophia spawn in Byzantium/Constantinople only if Christianity is present there? Right now, the closest that I can do is make it spawn only if Christianity is the state religion of whoever owns the city:
Trigger("HagiaCheck").built(126)
Trigger("HagiaSpawn").date(537).fired("HagiaCheck",False)[COLOR="Red"].target(68,45).owned()[/COLOR].check().faith(1).buildings(126)[COLOR="Red"].religions(1)[/COLOR]