Assistance needed for changing starting units

Joined
Jul 21, 2008
Messages
698
As the thread title suggests, I'm trying to change the starting units of spawning civs in my Scenario+modmod because I've drastically increased the number of independent cities in Europe, but I have no idea how to do so without breaking the game. I've tried changing some numbers in RiseAndFall.py, but all it gives me is the "You Have Been Defeated!" screen on start.

I'm working with RFC: epic/marathon and using PyScenario if it makes any difference.
 
You're right to make your changes in RiseAndFall.py.

I guess the problem is that you've made some minor syntactic error in the code which results in the Python file not being properly loaded (and thus spawns etc. not happening). From here it's difficult to find out what went wrong, but as a first guess, did you mind indentations?

I generally suggest to enable Python exceptions by setting the respective entry in _Civ4Config from 1 to 0 (look for hide python exceptions). Then the game will show you the line of code that caused your problem.
 
Thanks for the tip! I'll try enabling Python exceptions and see where I messed up. I really don't know what went wrong, as all I did was replace a number with another (e.g. 3 instead of 2, etc.)

EDIT: Hmm, everything works now. Shame, because I had lost about 10 hours of work when I tried to reinstall RFC: epic/marathon to get the original files back (I had put my modded folder in another directory but somehow it got overridden :( )
 
Sorry for double post, but I have another question: Is it possible to make post 600 AD civs playable in the 600 AD scenario? I've converted Carthage into Al-Andalus and Greece into Bulgaria, but I have no idea how to make them playable. I've tried tIsActiveOnLateStart 0/1 in Consts.py, but it appears to have done nothing.
 
Sorry for double post, but I have another question: Is it possible to make post 600 AD civs playable in the 600 AD scenario? I've converted Carthage into Al-Andalus and Greece into Bulgaria, but I have no idea how to make them playable. I've tried tIsActiveOnLateStart 0/1 in Consts.py, but it appears to have done nothing.
Spawn dates are hard-coded in the SDK, unfortunately. But you could "respawn" the Civ with PyScenario:
Code:
Trigger("spawn al-andalus").player(iCarthage).date(711).respawn(2,True)...
Refer to the API for more details.
 
Try enabling the Civ in the WBS:
Code:
BeginPlayer
	LeaderType=LEADER_HANNIBAL
	CivType=CIVILIZATION_CARTHAGE                 
	Team=6                 
	PlayableCiv=[B][COLOR="Red"]1[/COLOR][/B]                 
	Handicap=HANDICAP_PRINCE                 
EndPlayer
Chances are that this will cause the mod not to load properly, even coupled with the change in Consts that you already tried. But you could try granting the Civ the starting units in the WBS also, because then it would be active from start anyway. :king: Unhistorical, I know, but so is Arabia in AD 600. :p
 
Look at the Byzantine tile entries in the WBS - some of them contain pre-set units. Copy-paste those entries and change them into whatever it is you need. Other than that, the WB is covered in the Modiki, so there is no reason for you not to know how to work it. (It is the most basic form of scenario making, after all.)
 
Double-check your entires. You could start off easy with just one unit, or something. This would help you to figure out what is wrong.

If all else fails, just post your WBS and we'll have a look at it.
 
Also, you could add those starting units with PyScenario - use the startup() Condition to modify the map before the game starts.
 
This is what I added to the WBS:

BeginPlot
x=54,y=39
isWOfRiver
RiverNSDirection=0
TerrainType=TERRAIN_PLAINS
PlotType=1
BeginUnit
UnitType=UNIT_LONGBOWMAN, UnitOwner=6
EndUnit
BeginUnit
UnitType=UNIT_LONGBOWMAN, UnitOwner=6
EndUnit
BeginUnit
UnitType=UNIT_WORKER, UnitOwner=6
EndUnit
BeginCity
CityOwner=6
CityName=Al-Jaza'ir
CityPopulation=2
BuildingType=BUILDING_PALACE
BuildingType=BUILDING_GRANARY
BuildingType=BUILDING_HARBOR
EndCity

EndPlot

EDIT: hmm, this doesn't seem to show indentation
 
Use the
Code:
 tags to show indentations (it doesn't matter for WB files, though).

On the matter of making pre 600 AD slots playable in 600 AD, I've seen it tried often, but never successfully. It seems to be rather difficult, so I suggest you try to use a workaround via triggered respawns like Baldyr's proposed PyScenario solution.
 
Yeah, I can't see anything awry with your WBS "code" either. The PyScenario option would be something like:
Code:
Trigger("al-andalus").player(iCarthage).startup(True).target(54,39).units(eType=iSettler)
 
Sadly, I've tried the PyScenario trigger you've sent me as well as others I've tried, but none have prevented the defeat message, except one time where for some reason I spawned as a catapult in Antartica, then flipped Cadiz a few turns later due to another trigger I wrote.

I have noticed something odd about it's spawn date though:
 
Are you completely sure that there's no syntax error in your changes to RiseAndFall.py? That would be the easiest explanation for the "you have been defeated" messages.

It says BC because the Carthaginians spawn BC. If you want to change that, you have to edit the DLL, which you'll have to do anyway if you want to modify spawn dates.
 
Yeah, changing Civs requires a new DLL file. Because the spawn date, settler maps and whatnot are located in the SDK.

Other than that, try starting over with a fresh set of files. An unedited RiseAndFall, Consts and WBS. Just to make sure you haven't made a mistake somewhere.
 
Don't bother trying to edit the WBS. I tried with Rome for 600 A.D. and it completely backfired. Something Rhye did to the 600 A.D. games made it imposable to play classical civs. Your best bet is to use cheat mode. Spawn a unit of Carthage then switch to them. It will kill your guy and spawn a catapult in the antarctic. Then just worldbuild your settlers and units back and away you go.
 
Top Bottom