Trade Unit Game Turn Zero Error

sman1975

Emperor
Joined
Aug 27, 2016
Messages
1,376
Location
Dallas, TX
Hello,

Am working on a scenario mod, and wanted to provide the player civs some trade units at the start of the scenario. Used a cargo ship, saw some surprising numbers:

upload_2018-11-21_16-55-7.jpeg

I established a trade route - just to check - and yes, these routes really do yield -110530 research a turn!

No gold for you!!!! :crazyeye:


I didn't establish any more routes, and by Game Turn 1, the numbers magically returned to the positive numbers that looked more or less like they should.

I realize this has something to do with the game not being set up to accommodate cargo ships sailing on GT 0. But Caravans also yield some interesting numbers, too:

upload_2018-11-21_16-58-55.jpeg


Fair enough. But short of using LUA to spawn cargo units on GT 1, does anyone have any ideas about how to provide "safe" cargo units at game start?

Thanks!
 
I can't remember off the top of my head anymore if it does but check to see if WorldBuilder has an option to "exhaust" a unit's moves in the unit editor as part of the map so they cannot do anything on turn 0.
 
@LeeS - actually, I think that's a pretty good suggestion. I'm trying to open WorldBuilder but ever since that #%$(*&^ new loader Steam slapped on Civ V a day or so ago - I can't open WB for some reason...

Researching now... :dubious:

I suppose, if worse comes to worst, I could slap a quick LUA routine to fire at PlayerDoTurn, check for GT 0 (Edit - but then again, this doesn't fire on GT 0, does it?), then set moves to 0 for all trade units.

Hopefully, WB will come through. If I ever get there....

Thanks!


EDIT - I was finally able to open WB. Had to clear game cache, then restart WB in DX9...

Unfortunately, I didn't see anything about setting moves to 0. There's Name, Health & Experience text boxes, and Fortified/Embarked/Garrisoned radio buttons.

I think I'll just kill the trade units, give a little extra gold at game start, and call it a day... :wallbash:
 
Last edited:
You don't need PlayerDoTurn to fire on GT 0. Just have a Lua function that executes as part of the script when it loads, have that check for GT 0, and do whatever you need to do.
 
Back
Top Bottom