View Full Version : City Revolt - questions and CTDs
Dol Guldur
11-10-2006, 23:13
Even after all this time I am still trying to understand the way city revolts work.
With revolts from your faction to rebels it draws upon the rebel tribes, but when your conquered settlement reverts back to the faction you took it from it seems to depend upon recruitment buildings already present - remove all these before it revolts and you get an empty settlement after the revolt...
But, in my build at least, mercs active for hire in such a region cause a CTD when this revolt occurs (to former faction, not rebels). If the merc is not present then it revolts to an empty settlement (assuming no recruitment bldgs). If there are recruitment buildings the merc will be found in the settlement. Mercs are set to slave and to the faction ownership of the land in which they are hireable.
This is very perplexing.
nikolai1962
12-10-2006, 09:40
If a city revolts back to a previous owner the units in the city afterwards depend on what that faction can build. if that faction can't build any units e.g because you just destroyed all the buildings, then as you say it pulls the units from the local merc pool.
Sometimes this causes the game to crash. Not entirely sure why as mercs should all by definiton be usable by all factions.
But i guess the answer is in that. Some mercs that aren't usable by the faction that gets the revolt?
(Might be some other reason though as maybe the reason the peasants in vanilla were all recruited in the indestructible governor building was a workaround for whatever the real cause is.)
nikolai1962
12-17-2006, 07:17
Been experimenting with this a bit as it seems to be a recurring problem with a lot of mods.
I don't think this problem is ever likely to happen when a city revolts to rebels because it draws units from the descr_rebel_factions list and if there are any errors in the record for the local rebels then the game crashes on load. The game also crashes on load if that record has zero units in it.
When a city revolts back to a previous owner the game doesn't crash if there are zero units available. The city garrison is empty afterwards, but that is all.
As mentioned previously, if there are no units buildable for that faction in the city then it draws units from the merc pool for that region.
One thing I did find is that in this case, factions can get units they don't have ownership of. I think this is the only time that can happen.
Unfortunately I haven't modded units/models/textures type stuff much so I don't know the type of errors you get but my guess is that it is one of those type of errors which doesn't normally show up because that faction can never normally use that unit.
Maybe?
wlesmana
12-17-2006, 09:23
Yes, factions can get assigned units they don't normally have or appear to have in EDU. But it crashes when you load a battle unless you specify the texture for that faction in DMB. I've seen it happen in early SPQR.
Dol Guldur
12-17-2006, 15:51
Yes, that's true. Best to make sure all units have slave textures then. Though I'm still not quite clear as to why it should ctd on city loyalist revolts if the garrison can be an empty one.
nikolai1962
12-19-2006, 07:41
Dunno why it should--just thought it might be a clue, as maybe the code that spawns the loyalist mercs has a bug when there is an ownership mismatch with textures or something. Not very familiar with unit/texture type bugs as I've never modded that stuff, so not sure how to set up a deliberate error to test the theory.
nikolai1962
12-28-2006, 07:32
May not be relevant to this problem but in the vanilla DMB file there are dev comments about not having units with both a slave and merc texture line. The units where this was true had their slave texture line commented out. The only exception had the path to its merc texture pointed at a "mercs" folder instead of merc.
Makanyane
12-28-2006, 11:35
nikolai see what you mean in RTW DMB though the last comment
;Special versions of some soldiers, that have both slave and mercenary versions
;This is necessary to get correct sprites for the mercs
seems to indicate problem could have been more to do with sprites, and actually nothing seems to have a
merc, sprite line.
Vanilla BI 1.6 has got merc and slave texture lines for all the mercenaries that are in use with no comments. (they only have the slave sprite specified though)
The light horse in both games has merc, and slave, texture lines but again not
merc, sprite.
Getting slightly confused - can anyone clarify safest way to write mercenary entries ? (for BI for me)
nikolai1962
12-29-2006, 11:02
seems to indicate problem could have been more to do with sprites
Yeah, could be just sprites and nothing to do with this problem but maybe...
Vanilla BI 1.6 has got merc and slave texture lines for all the mercenaries that are in use with no comments. (they only have the slave sprite specified though)
I don't have BI yet (so slow :) ) -- in the vanilla 1.5 file the only unit which has both a slave and merc texture has the path going to "mercs" instead of "merc". Is the BI one the same or is the path "merc"?
Makanyane
12-29-2006, 11:21
type merc_foederati_infantry
skeleton fs_slow_spearman, fs_slow_swordsman
indiv_range 40
texture slave, bi/data/models_unit/textures/BI_unit_foederati_slave.tga
texture merc, bi/data/models_unit/textures/BI_unit_merc_foederati_infantry.tga
model_flexi bi/data/models_unit/BI_unit_foederati_lod1.cas, 15
model_flexi bi/data/models_unit/BI_unit_foederati_lod2.cas, 30
model_flexi bi/data/models_unit/BI_unit_foederati_lod3.cas, 40
model_flexi bi/data/models_unit/BI_unit_foederati_lod4.cas, max
model_sprite 60.0, bi/data/sprites/merc_foederati_infantry_sprite.spr
model_sprite slave, 60.0, bi/data/sprites/slave_merc_foederati_infantry_sprite.spr
model_tri 400, 0.5f, 0.5f, 0.5f
Fairly typical BI mercenary entry
nikolai1962
12-29-2006, 11:42
type barb_horse_archer_merc
skeleton fs_hc_archer, fs_hc_swordsman
indiv_range 40
texture scythia, data/models_unit/textures/unit_barb_warband_archer_scythia.tga
texture slave, data/models_unit/textures/unit_barb_warband_archer_slave.tga
texture mercs, data/models_unit/textures/unit_barb_warband_archer_merc.tga
model_flexi data/models_unit/unit_warband_archer_high.cas, 8
model_flexi data/models_unit/unit_warband_archer_med.cas, 15
model_flexi data/models_unit/unit_warband_archer_low.cas, 30
model_flexi data/models_unit/unit_warband_archer_lowest.cas, max
model_sprite 60.0, data/sprites/barb_horse_archer_merc_sprite.spr
model_sprite slave, 60.0, data/sprites/slave_barb_horse_archer_merc_sprite.spr
model_sprite scythia, 60.0, data/sprites/scythia_barb_horse_archer_merc_sprite.spr
model_tri 400, 0.5f, 0.5f, 0.5f
The only one from the vanilla 1.5 DMB with both merc and slave textures on the same entry.
So it seems like they fixed whatever the problem was. So I guess if the loyalist revolt CTD still happens in BI/1.6 then it is unlikely to be anything to do with this :(
nikolai1962
12-30-2006, 07:55
Did a test with vanilla. Removed carth peasants. Took a numidian city. Let it revolt. CTD.
It is the mercs causing it.
Remove the mercs from the pool for that region (or just recruit them all instead) and you get an empty garrison revolt. When there are mercs available it CTDs.
If there are peasants *and* mercs then sometimes you get a mixed revolt. No CTD in those cases.
Can't figure out why though.
Something to do with the general assigned?
If anyone has a case in their mod where merc-only loyalist revolts don't cause a CTD then it would be useful to see how that unit/generals etc are set up in terms of textures/ownership etc.
May be unfixable otherwise, apart from work-arounds.
~~~
RTR has some custom rebel units buildable in the governor buildings which are slave ownership only and therefore normally unbuildable by factions. However because of the way loyalist revolts ignore slave only ownership, loyalist revolts in RTR get these units. This may be the best way to solve it. Though apparently it isn't a 100% fix.
~~~
As an aside, re another thread about revolt uber-units, it seems faction units in loyalist revolts get up to 9 exp while non-faction units i.e slave ownership units that get assigned in a revolt, don't get the exp.
Dol Guldur
12-30-2006, 13:42
Yep, that confirms my first post then.
I do not see how the slave workaround is feasible if it is not a 100% one. I assume it works by having an unconditioned edb recruitment line and a slave-only edu ownership line? So it will then cause a CTD on a right-click of the unit in the building scroll (and still appear as a recruitable unit even though it will not appear in the recruitment scroll)?
Pity - I would like to curb the xp hikes the AI puts on.
Currently the Fourth Age has Regional Lore 'Buildings' (indestructable base buildings) in each region which, among other things, have a "revolt unit" accessible for recruitment. I'd rather they were not there (not least becuase the AI creates massive 8XP/1 weapon/2 armour armies on revolts).
It stops all the revolt CTDs but it's not ideal. I may have to go to the extreme of creating peasant units with like 0.1 lethality...
Makanyane
12-30-2006, 14:48
How frequently / on what version is revolt CTD supposed to occur? I've just done half dozen tests on my BI mod (no peasants) and get mercenaries in city but no CTD then or in battle with them afterwards.
Don't know if that's just because I haven't tried enough times or if that's promising - I'll try and track down permutations if the latter.
Dol Guldur
12-30-2006, 14:56
BI 1.6
They occur at all instances of loyalist revolt where mercs are present and where there is no recruitment lines present in the buildings of the revolting settlement - as per my first post and nikolai's last.
Not sure I understood your question though...
Makanyane
12-30-2006, 15:15
Ahh, I'm not sure I'm understanding the description of the CTD being caused by the mercs!
They occur at all instances of loyalist revolt where mercs are present and where there is no recruitment lines present in the buildings of the revolting settlement
That's what I was testing I get mercs in city but as yet no CTD. On the grounds you knew you were getting mercs in city, I assumed CTD must either be later (in battle?) or only occasional.
If occasional I was asking for estimation of how often, as so far I've not crashed on 6 attempts, if that's significant I'll keep testing to try and find difference - if it just CTD's 1 in 100 times I won't....
Dol Guldur
12-30-2006, 17:26
My first post (explained):
With civil revolts from your faction's initial settlements (where they are the faction creator and default faction) to rebels it draws upon the rebel tribes defined in the rebels factions file, *but* when a conquered settlement revolts it reverts back to the faction you took it from (a loyalist revolt), or it reverts back to your control when it revolts from a faction that has conquered one of your starting cities.
In these loyalist revolts it seems to depend upon recruitment buildings already present - remove all these before it revolts and you get an empty settlement after the revolt...
But, in my build at least, mercs active for hire (i.e. not yet hired) in such a region cause a CTD when this loyalist revolt occurs (to former faction, not rebels) at the end of the turn. If the merc is *not* present (becuase it has been hired and the game has not yet replenished it) then the settlement revolts to an empty settlement (assuming no recruitment bldgs). If there are recruitment buildings the merc will be found in the settlement. Mercs are set to slave and to the faction ownership of the land in which they are hireable.
So CTD occurs when:
* merc/s is/are present for hire
* loyalist revolt occurs
* no buildings with recruitment lines of faction revolting to are present
* no garrison or a garrison larger than 2-3 units is present (exact number untested)
CTD does not occur when mercs are not present.
WHy???
This is very perplexing.
EDIT: Updated for new information about garrison presence.
Makanyane
12-30-2006, 18:26
Understood now, was misreading part about merc being found in settlement to be same as what was happening for my game - without CTD.
If I demolished all recruitment buildings and provoked loyalist revolt - whilst one mercenary type X was available I was getting revolt without CTD but with 6x units of mercenary type X as garrison in city after revolt. (Read description too quickly and thought that was what you meant, and couldn't understand where CTD was!)
Have been trying few more test revolts and for me it seems that if I leave one unit of garrison in city that's about to go then it works as above now approx 19 times out of 20 (did finally get one CTD with that condition). I just get a multiple mercenary garrison without added experience / armour.
If I take all army out of city prior to revolt then I do get CTD about 5 times from 6.
Hadn't really noticed it as problem before (probably if above ratio holds true, because the city wouldn't normally be completely empty) and was wondering if there was something different in my build...
EDIT: just realised two regions I've tested on only have one possible merc type in their recruitment pool ????
nikolai1962
12-31-2006, 04:07
I've just done half dozen tests on my BI mod (no peasants) and get mercenaries in city but no CTD then or in battle with them afterwards.
Odd, I get them every time. Maybe your mercs are set up in a way that doesn't cause the problem?
I do not see how the slave workaround is feasible if it is not a 100% one. I assume it works by having an unconditioned edb recruitment line and a slave-only edu ownership line? So it will then cause a CTD on a right-click of the unit in the building scroll (and still appear as a recruitable unit even though it will not appear in the recruitment scroll)?
Hmmm, I didn't know about the right-click thing. That's a problem.
However, the slave unit solution can be made 100% I think. It isn't currently in RTRPE but i think i know why now. However it still crashes if you have the slave ownership unit available and all the mercs have been recruited. So basically if you just have the slave unit or just have mercs (and no faction units) then it CTDs.
However if you have both (of the right kind) then it doesn't.
What I'm going to do is have a revolt unit for each aor. That unit will be recruitable by slave faction from the governor building *and* i'm going to add the same unit to the merc pools for all the regions in that aor but make it very expensive and maybe Max 20, Init 20 as well to make almost certain that it won't be recruited or completely recruited.
If the unit exists in both the governor building and the local merc pool then no loyalist revolt CTD.
It *appears* that not all units work for this. A skirmisher unit didn't work but a single animation spear unit did, so maybe that is a clue as to why it happens.
Not perfect now that i find out about the right-click thing but better than the current situation imo.
(No uber exp from these units btw, just small armour upgrades. Seem to only get the uber exp when it is faction units. At least in my tests.)
nikolai1962
12-31-2006, 14:52
To elaborate on what i did that worked.
Using vanilla as test-playing egypt-attacking siwa and letting it revolt.
1) make the default faction/faction creator for siwa be numidia (otherwise it will revolt to rebels)
2) remove peasant units from gov buildings.
3) take siwa, destroy any barracks buildings, leave and wait for revolt.
case1:
no faction units
no slave unit
available mercs
= CTD
case2:
no faction units
no slave unit
recruit all the local mercs
= loyalist revolt, empty garrison
4) add a slave unit with the line:
recruit "merc libyan infantry" 0
to the governor buildings in the EDB. This unit has "slave" ownership only so can't be built by any faction even though it has no building conditions.
case3:
no faction units
libyan merc as slave unit
available mercs
= CTD
case4:
no faction units
libyan merc as slave unit
recruit all local mercs before revolt
= CTD
5) replace the
recruit "merc libyan infantry" 0
with
recruit "merc barbarian infantry" 0
6) add merc barbarian infantry to the merc pool for libya as well
case5:
no faction units
barbarian merc as unbuildable slave unit
recruit the barbarian merc from the merc pool before revolt
= CTD
case6:
no faction units
barbarian merc as unbuildable slave unit
barbarian merc unit in local merc pool
= loyalist revolt with mix of the slave unit and mercs.
(as mentioned by dol guldur the presence of the slave unit is listed in the governor building and if you right-click it the game ctd's. i think that is less of an issue than the loyalist revolt ctd. though it would be nice to have a cleaner solution.)
~~~
conclusion
if every region on your map has a slave unit/local merc pairing of a unit that works, and you make the merc part of that pair expensive enough to not be recruited then it seems you can cure the loyalist revolt ctd.
~~~
(there may be an easier way of course)
Makanyane
12-31-2006, 15:12
Odd, I get them every time. Maybe your mercs are set up in a way that doesn't cause the problem?
Unfortunately doesn't look like that's the case, just tried tests on vanilla BI with Sarmatians taking starting city off Sassanids and peasants etc. removed from EDB. That actually seems to work same way as my mod for me i.e. crashes if no garrison left in city but not normally if a couple of units are left in city until the revolt ejects them.
Where both of you testing with or without garrison in the city?
With the garrison there (which gets ejected), no recruitment buildings and hire-able mercenaries present, I get occasional CTD but more usually a set number of mercenaries randomly selected from the currently hire-able merc unit types available in the region (random selection if more than one type hire-able - otherwise just 6 / 8 of same one).
The number of mercenaries that appear in city is not related to the overall merc recruitment pool or the number currently available in the region but seems possibly linked to city level - 6 for minor_city 8 for large_city ? (or at least I couldn't find anything else that explained variation so far)
DG I assume from us not understanding each other when I asked about how often CTD occurs that yours crashes each time too?
Would be rather depressing if this does vary between computers rather than mod build, as I'm now not sure if mod could have more severe problem with this on other m/c... :embarassed:
EDIT: Sorry Nikolai wasn't ignoring your last post hadn't seen it whilst posting this.
Dol Guldur
12-31-2006, 15:23
Good work Nikolai - I was beginning to think that each pool needed at least 2 mercs (vanilla has 2 in its smallest pool) but your case 1 disproves that I guess.
I'm going to keep thinking about this as I am one of those who likes clean solutions and so far I prefer the method we are using - of having a base unit available from an indestructable building which exists from game start in all regions. It's just how I justify having it there and making it virtually ineffective in battle with .1 lethality or something...not even a peasant would be that bad by I do not know how to stop the XP being added. Maybe I should reduce the unit size to 6 too...
EDIT: I was testing it mainly with the garrison out of the city in my mod - but I tried it in BI vanilla with sarmatian garrison in Artaxarta and it crashed. Happens every time as far as I've tested.
Makanyane
01-04-2007, 21:03
Nikolai, I'm trying to duplicate your results with BI and not getting anywhere, following principal of this:
case6:
no faction units
barbarian merc as unbuildable slave unit
barbarian merc unit in local merc pool
= loyalist revolt with mix of the slave unit and mercs.
I've tried with various BI mercs; merc veteranii which are spear and sword
merc gallowglass which are sword and
merc foederati infantry which are spear only, and I would have thought closest to your barbarian merc. It still seems generally to crash if it revolts without garrison in city and not if it has garrison to be ejected when it revolts, even with matched available merc and slave unit in core building.
Did you try any other permutations of merc unit? I'm not sure if failure so far is due to BI, me or type of merc unit!
Dol Guldur
01-04-2007, 21:49
Well - as I just posted in the RTR thread - I am certainly getting CTDs with the to-be ejected garrison present. I also noticed that, when a loyalist revolt in an area with no mercs available leads to an empty garrison that I get no loyalist revolt event message. Hmmm...
Makanyane, maybe it would be a good idea for someone to send over saved games (of vanilla BI) to test if something different is happening...though I did get a ctd blocked by having a garrison present in BI vanilla when I tested.
Makanyane
01-04-2007, 23:12
http://www.megaupload.com/?d=SE8PZUXJ
EDB without recruit lines for core buildings - test strat with moved sarmatian army in position to attack Ctesiphon - and save game, revolt should occur next go, have just tried few times with the one unit left in = revolt but no CTD, unit removed = CTD on end turn.
That's the only city I've tested on in vanilla, I was mainly testing on my mod from an ammended strat and in late saves where I knew I could get revolts. Only went as far as the one city in vanilla as it seemed to confirm findings.
Dol Guldur, if you're testing on CI could you send me the test EDB and saves to see if I get same result????
Dol Guldur
01-04-2007, 23:37
I am working (and testing) in a build somewhat more enhanced than CI 1.2 (it's 1.5) so that'll be no good to you. I have started testing BI vanilla 1.6 though.
I attach the link to my saved game. Please use all vanilla (BI 1.6) files with the exception of the EDB which should only be altered by placing a semi-colon before the sassannid-peasant recruitment line for the city-level govt. bldg.
http://www.megaupload.com/?d=RBZGWS3M
This is me taking the Huns down to attack Artaxarta. It CTDs even with a garrison in my tests - perhaps you can spot what we are doing differently?
Will report back on your saved game shortly.
Makanyane
01-05-2007, 00:12
With your save if I leave all or most of garrison in I CTD, if I remove most and leave 1 or 2 troops it seems to revolt OK, 3 or more left in and CTD comes back. I was previously testing with only 1 unit (didn't occur to me that number could make difference, LOL)
Note: I've only tried two/three instances of each so far, will keep trying to check consistency of effect and try same on my save.
EDIT: looks same on my save adding one more unit OK, adding two = 3 garrison =CTD, unfortunately this does disprove my hope / belief that this wasn't going to happen on AI turns due to presence of garrison.
Dol Guldur
01-05-2007, 00:20
Curiouser and curiouser ;)
Case 1 (as per Makanyane's saved game)
1. 1 garrison unit present
2. Mercs available
= NO CTD (merc garrison)
Case 2
1. main army and garrison position swapped
2. Mercs available
= CTD (n/a)
Case 3
1. main army and garrison position still swapped
2. Mercs not available (i.e. hired and in settlement or in region)
= NO CTD (empty garrison)
What does this tell us?
EDIT: If your tests hold true (mine never seem a probability of 5 out of 6 or whatever - seems black and white) then perhaps the *chance* of something going wrong increases per unit. Yes, I think you will get more CTDs in your mod than you first anticipated. :(
nikolai1962
01-05-2007, 06:26
(sorry for delay)
Did you try any other permutations of merc unit? I'm not sure if failure so far is due to BI, me or type of merc unit!
Yes, and not quite as simple as i'd thought. I tried all the standard merc units in vanilla 1.5, one at a time. I had them set up as the only merc unit available in the region and also as the slave unit buildable in the governor building.
merc cretan archers
merc rhodian slingers
merc samnite
merc sarmatian cavalry
merc bastarnae
merc barbarian infantry
merc greek hoplites
worked when set up this way.
merc elephants
merc balearic slingers
merc bedouin archers
merc bedouin
merc arab cavalry
merc eastern infantry
merc spanish infantry
merc horse archers
merc thracian
merc cilician pirate
merc illyrian
merc barbarian cavalry
merc peltast
merc libyan infantry
merc numidian cavalry
caused a ctd.
complications:
1) The units that cause a ctd when they are the only unit in the pool would sometimes work when there were multiple merc unit types in the pool. Sometimes it still crashed. Maybe if the game randomly picks one of the merc units that work as the first unit it selects, then the others are ok.
2) The merc bastarnae worked without needing to be paired i.e it could just be available as a merc or just as a slave unit. The merc barb infantry only worked when paired.
3) Sometimes the units that usually work when paired will cause a CTD on first loading the game. Then if you reload and continue campaign you don't get the CTD.
I was hoping to find a pattern by doing this but there doesn't seem to be one. The merc tharcian unit in vanilla is almost identical to the merc bastarnae but it causes a ctd while the bastarnae doesn't. I tried changing all the things that are different between them but no good. So I don't think the root cause of the ctd can be ownership, text, skeletons or textures.
Very annoying.
~~~
Where both of you testing with or without garrison in the city?
All my tests were with no garrison in the city. I'll try it with a garrison.
~~~
--------------------------------------------------------------------------------
With your save if I leave all or most of garrison in I CTD, if I remove most and leave 1 or 2 troops it seems to revolt OK, 3 or more left in and CTD comes back. I was previously testing with only 1 unit (didn't occur to me that number could make difference, LOL)
Weird. I'm beginning to think it is some kind of memory glitch related to how they store unit info and therefore possibly untouchable through modding.
~~~
Would be rather depressing if this does vary between computers rather than mod build, as I'm now not sure if mod could have more severe problem with this on other m/c...
So far there doesn't seem to be a moddable reason why some units work and others don't so it might be some kind of memory/resources glitch that could possibly vary between machines. It would be a bit depressing if there was no 100% solution.
~~~
I'm going to keep thinking about this as I am one of those who likes clean solutions and so far I prefer the method we are using - of having a base unit available from an indestructable building which exists from game start in all regions. It's just how I justify having it there and making it virtually ineffective in battle with .1 lethality or something...not even a peasant would be that bad by I do not know how to stop the XP being added. Maybe I should reduce the unit size to 6 too...
Fair enough. It would be a lot better to have a 100% solution. I know this pairing method works on my machine as I'd done it already on my personal mod for other reasons and it fixed the revolt ctd's. But without a clear reason *why* some units work when set up this way it's hard to be sure if it is not machine specific. In which case a base unit like yours is probably the safest solution for a public mod, just with low base stats to make up for the exp they get.
Also, if you only need it to prevent revolt CTDs you could make it really expensive so it is not part of the normal game.
Hmm, having said that, i might do that myself instead of the pairing. I don't like being able to recruit units straight away when i take a city but if i can make it expensive enough to be effectively unbuildable, hmm.
Makanyane
01-05-2007, 07:49
EDIT: If your tests hold true (mine never seem a probability of 5 out of 6 or whatever - seems black and white) then perhaps the *chance* of something going wrong increases per unit.
Hmm, if its actually going to prove anything, whether one unit garrison is 100% OK, etc. I'd need to go back and test now we know that's definitely part of the equation. When I did crash originally with small garrison I might have had two or more units (before realising that was a variable). With the two unit garrison though it does seem more random, and including the general in the two units seems to make it CTD more, though not 100% of time. The empty garrison situation I'm tending to test less as it means complete re-start, so overall I've still only had the one instance of a successful revolt, vaguely possible that something else was faulty in that test - but it did stand out in my mind that it had worked as the exception to the general rule (it definitely doesn't happen often though).
Nikolai, thanks for trying other merc units, though that does add another element to the confusion ! :embarassed:
Now me and Dol Guldur are testing closer to the same variables the results do seem more aligned, so I'm less inclined to think its machine related. If you have 1.5 vanilla saves, for the working / non-working mercenary combinations you could post them (plus EDB and mercs file?) and see if we get same result.
Unfortunately I can't think of anything that would link the difference in garrison size with the presence or not of the merc. There shouldn't in theory be any sort of odds calculation between the merc and the garrison, but can't think of anything else either. If it was purely to do with the ejection of the garrison (mix of units = different ejection distance etc) then the merc being there shouldn't make any difference!
Fair enough. It would be a lot better to have a 100% solution. I know this pairing method works on my machine as I'd done it already on my personal mod for other reasons and it fixed the revolt ctd's. But without a clear reason *why* some units work when set up this way it's hard to be sure if it is not machine specific. In which case a base unit like yours is probably the safest solution for a public mod, just with low base stats to make up for the exp they get.
Also, if you only need it to prevent revolt CTDs you could make it really expensive so it is not part of the normal game.
Hmm, having said that, i might do that myself instead of the pairing. I don't like being able to recruit units straight away when i take a city but if i can make it expensive enough to be effectively unbuildable, hmm.
I'm heading more towards the base unit idea but stuck on quite where to pitch it in terms of stats. If its low stats (like peasant) it doesn't matter so much about them being available everywhere, however I can't find way yet of stopping AI recruiting them (and hence turning up with something useless in battle). I've tried upping initial price to 5000 and giving 1,1,1 stats but given enough money the AI still seems to recruit a random percentage of them - I'm not sure how much more sensible it gets if it only has moderate amount of money, so don't know if it could also mess up its economy :no: Any ideas on deterring AI from recruiting?
A higher stat unit available from the beginning of the game would obviously distort things too much and give unstoppable units if they also gained mega experience in an early revolt. (I can't suss out the experience gain either - that seems to vary between cities / instances with no underlying logic I can spot, yet) :no:
Makanyane
01-06-2007, 19:19
Haven't got any further on the root cause of the CTD but have an idea that seems to work for handling the indestructible building and providing a low stat unit that doesn't keep getting recruited by the AI throughout the game.
Solution does mean that all settlements can always recruit one unit even without barracks etc. and will mean that you do always get an army generated by revolts
(pinching ideas slightly from CI and RTRPE fix, sorry chaps...)
Set indestructible building as settlement_min village so it doesn't appear in browser. Place indestructible building 1st in each settlement in descr_strat so its first in built building display, make small tga for built building either look like part of UI background or mod logo. Give it recruitment lines for factions own units like
recruit "militia albion" 0 requires factions { empire_west, } and not building_present_min_level barracks muster_field
and before you all say 'you can't use building conditionals in 1.6'. Proviso is don't give building any other capability other than recruitment and make the 'building_constructed.tga' too tall (I just used 360 x 500 pixels high). That tga displays all over the scroll that opens if nosy user right clicks the 'building', scroll doesn't get scroll bar either - so user cannot click the (now invisible) recruitment line :laugh4:
Does seem to work and I have tested on forced revolt with no other recruit buildings present, but eagerly await everyone telling me why its wrong.....
Dol Guldur
01-06-2007, 20:50
Hey, you pinched...j/k :beam:
I am still toying with the invisible building idea; what we have at present serves but there are some global tweaks (base building capabilities) that I would like to keep hidden simply to balance the game more effectively. Our original base building idea was indeed global and to be a part of the UI; but I found it far better to have regional buildings to address the differing areas of Middle-earth and their affect upon the races/factions. No reason why I can't have a global one too though - especially if it can kill two birds with one stone. The idea that the 'revolt unit' disappears after building a first building / or muster field is appealing.
EDIT: Hmmm..forgot about the bonus incompatabilitywith recruitment lines dependent upon buildings. I shall probably make it a visible building then. Oh dear, I shall have to be creative....
I haven't read all of your diskussion but here is my expirience with it in EB:
The current EB version has some Problems with settlements rebelling to a faction = CTD if no recruitment is available but mercs hireable.
For example a carthagian army conquers an Aedui settlement, destroys every destrucable building and moves one leaving a settlment with 0% loyality, after ~two turns the city revolts, bang CTD.
EB 0.8 had many unit graphik Bugs, too, which have been resolved by Aymar.
While repairing the bugged models/textures he found many faction ownership and recruitment errors, especially regarding faction/regional units that use the merc trick to have different skins on the same model (for example: late Hastati/Prinzipes are using the same model, the hastati are using the faction slot and the prinzipes the merc one).
Aymar released an intern 0.81 update, which has been tested and enhanced with much other stuff, unitl now. But the best thing was, in the new version we haven't encountered the reblling City CTD, yet. I have made test's with different factions
No recruitment available (barracks destroyed), mercs available
Rebelling to faction, settlement full of mercs
No recruitment available (barracks destroyed), no mercs available
Rebelling to faction, settlement empty
Recruitment available, mercs available
rebelling to faction settlement full of (high expierieneced)factions units/regionals, mercs
Recruitment available, mercs not
rebelling t faction settlement full of (high expierieineced)factions units/regionals
Makanyane
01-07-2007, 00:26
Aargh, just when I thought we were all coming to same conclusion...
thanks anyway Bonny, for info. Can you explain what you mean by the merc trick? We're getting same problem in 'vanilla' BI (with peasants removed) and in that mercs have only merc and slave texture and slave EDU ownership, do you think that DMB set up is part of issue? (I'm stumped as to why DMB would come in to it at settlement revolt stage)
when you were testing did you leave any garrison in settlement about to revolt? Recent finding seems to be that for 'vanilla' without peasants and also my mod leaving one unit (and one unit only) as garrison gives smooth transition through revolt without CTD.
EDIT: Hmmm..forgot about the bonus incompatabilitywith recruitment lines dependent upon buildings. I shall probably make it a visible building then. Oh dear, I shall have to be creative.... Other thought I had is if within limited circumstances it is necessary to use building conditional recruitment (in separate building from other bonuses to avoid that CTD) then you could possibly set up building initially without conditional, take screenie then make that screenie into the oversized construction.tga (possibly with adjustment as margins are different between text and pic.) - that obviously wouldn't be clickable but would give info without CTD. Problem is it wouldn't follow changing situation such as building / demolition of barracks so that would need to be explained within temporary initial unit name / or within description text.
Dol Guldur
01-07-2007, 01:08
Makanyane, I like the way you think ;)
But here's what I've done. I have an info building (global prebuilt indestructable) which gives the player universal access to critical mod information (such as known CTDs and how to avoid them), whilst of course behind it all is the building-conditoned peasant unit set for each region by hidden resources according to faction and which disappears on the construction of that faction's first barracks building.
The invisible building was not clean enough for me, and this provide a means to inform the player too. (building title and image may be improved :) )
https://i39.photobucket.com/albums/e166/dubhdara/info_bldg.jpg
regarding the fourth age critical information:
it looks like you are using costum sounds, and at least some of them are compiled in 44khz, am i right?
If you play RTW with an EAX sound system (EAX2 or EAX3), 44khz sounds make the game freeze, EAX needs 22khz sound files to work properly.
(NTW2 had the same problem, with game freezes, because of an militiaunit used bullet sound which was compiled in 44khz)
the merc trick (as i understand it, but i haven't asked one of the real modders)
; Roman infantry - Hastati / Principes (Late)
type roman_infantry_hastati_principes
skeleton fs_pilum, fs_gladius
indiv_range 40
texture seleucid, eb/data/models_unit/textures/ebunit_Prome_new_unit_roman_late_Hastatii_Julii.TGA
texture merc, eb/data/models_unit/textures/ebunit_Prome_new_unit_roman_late_Principes_Julii.TGA
texture slave, eb/data/models_unit/textures/ebunit_Prome_new_unit_roman_late_Hastatii_Julii.TGA
model_flexi_m eb/data/models_unit/ebunit_Prome_new_unit_roman_late_HastatiiPrincipes_high.cas, 15
model_flexi_m eb/data/models_unit/ebunit_Prome_new_unit_roman_late_HastatiiPrincipes_high.cas, 30
model_flexi_m eb/data/models_unit/ebunit_Prome_new_unit_roman_late_HastatiiPrincipes_high.cas, 40
model_flexi eb/data/models_unit/ebunit_Prome_new_unit_roman_late_HastatiiPrincipes_high.cas, max
model_sprite seleucid, 60.0, eb/data/sprites/roman/ebsprite_roman_infantry_hastati_all.spr
model_sprite merc, 60.0, eb/data/sprites/roman/ebsprite_roman_infantry_principes_merc.spr
model_sprite slave, 60.0, eb/data/sprites/roman/ebsprite_roman_infantry_hastati_all.spr
model_tri 400, 0.5f, 0.5f, 0.5f
This is the EB dmb entry for late Hastati/Prinzipes
the seleucid texture path is highlighted red, it's the roman late hastati, which can be recruited after the first reform, by the romans.
The merc texture path is highlighted blue, it's the late Principes, which can also be recruited by the romans.
Now we have two different units for one faction edu, wich are using only one model slot.
The only problem is, that the pricinpes sprite ebsprite_roman_infantry_principes_merc.spr (merc path)
is not working, the game always uses the hastati sprites (seleucid path).
I think, this is the reason for this entry in vanilla RTW1.5 dmb
;;;;;; MERCENARIES ;;;;;;;;;;;;;;;;;;;
;Special versions of some soldiers, that have both slave and mercenary versions
;This is necessary to get correct sprites for the mercs
type barb_cavalry_merc
skeleton fs_hc_spearman ; combat spear
indiv_range 40
texture merc, data/models_unit/textures/unit_barb_warband_merc.tga
model_flexi data/models_unit/unit_barb_warband_cavalry_high.cas, 8
model_flexi data/models_unit/unit_barb_warband_cavalry_med.cas, 15
model_flexi data/models_unit/unit_barb_warband_cavalry_low.cas, 30
model_flexi data/models_unit/unit_barb_warband_cavalry_lowest.cas, max
model_sprite 60.0, data/sprites/barb_cavalry_merc_sprite.spr
model_tri 400, 0.5f, 0.5f, 0.5f
Dol Guldur
01-07-2007, 16:08
Thx. Bonny - I have passed this information to our audio guy.
wlesmana
01-10-2007, 16:32
Question: when the revolt happens to the AI, does it also CTD? Also, does it CTD in the middle of the AI faction's turn (or at their end, aka. before another faction's turn) or is it right at the beginning of that faction's turn?
Makanyane
01-14-2007, 23:55
Oh $%^&£^&, *wonders what swear words you're allowed to use on this forum*
have belatedly realised flaw in my earlier proposal, if barracks building exists but is too damaged by rioting to produce troops then the building conditioned recruitment line in the indestructible building won't activate (and we'd just sorted some rather nice graphics for it as well ) :thumbsdown:
wanders despondently back to square one...
Vanilla should theoretically also have had this problem where recruit buildings were damaged or non-existent and core (peasant producing) building was damaged, can't remember at the moment if there were reported problems or not.
___________________________________________________________________
wlesmana, sorry meant to reply earlier, yes we think it can happen in AI turn, though AI doesn't destroy existing recruitment buildings, if they don't exist for loyalist faction, due to lack of development, damage or aor system then it can theoretically occur. I think also RTRPE had found that it happened for them in practice on AI turn but need to go back and re-read their thread to confirm.
What I wanted to do and hadn't got round to is set up a test provincial campaign. Take peasants etc out of EDB, give 'x' faction a very unhappy city, large population with no recruit or happy buildings and big distance / culture penalty, and with other faction as creator in regions and strat, so it revolts to faction not rebels. Make sure lots of very expensive mercenaries are available (so no-one buys them all) and that faction 'x' has no money to build recruit buildings. That should prove out case when it revolts and if it CTD's show you where. I probably will go back and try it for BI now but suggest if you're using Alex. that you test in that too.
Makanyane
01-15-2007, 00:34
Update on above I realised; it is salvageable but you need alternative recruit lines so as well as :
recruit "garrison milice de eppee" 0 requires factions { franks, } and not building_present_min_level barracks muster_field
you also have:
recruit "milice de eppee" 0 requires factions { franks, } and building_present_min_level barracks muster_field
Could also possibly condition that so it doesn't apply if next level barracks is present and give new recruit line for that level etc. That doesn't seem to result in duplicate display in recruitable list if barracks is present, but I'm not sure if trying to add all the recruit permutations might break some sort of hc limit.
Dol Guldur
01-15-2007, 00:42
Hmmm....I'm not going to have much time for a few days. I was not sure whether a damaged building would respond as I have not tested it. Do let me know how your vanilla tests go.
Yep, I am sure the CTD occurs on AI - I think it's where we (fatw) first spotted it in fact.
EDIT: Mak, good thinking but won't that mean the darn unit is available for recruiting beyond the bare necessity and thus also for the AI? I want to avoid that.
Makanyane
01-15-2007, 19:58
Hmmph, remembered after my suggestion of way to test that you need to get AI to take city rather than give it to them at start or it will only revolt to rebels regardless of faction creators. Tested in my mod in the end, as I've more idea in that, what cities factions will normally take (placing armies near vulnerable city not on their usual expansion path didn't make them take bait).
Have viewed numerous loyalist revolts away from AI faction but have not CTD'd
think this is because the AI keeps taking most of its army out of the about to revolt city, has so far normally left just one unit in, and occasionally a maximum of two. But it hasn't got it self in situation of having loyalist revolt with either empty or large garrison in city, which as we found earlier appeared to be one of the other pre-requisites for the crash. As I can't get it to crash currently I can't answer questions about exactly when in turn it would occur or effect of damaged buildings.
The AI behaviour of pulling the troops out before revolt looks suspiciously as though the programming is designed around the bug!?
When others have experienced CTD's on AI's turn it could be that the AI has got its calculation on revolt likelihood messed up, or additional damage to building or death or birth of leader / forced retreat into city etc, has altered situation.
EDIT: Mak, good thinking but won't that mean the darn unit is available for recruiting beyond the bare necessity and thus also for the AI? I want to avoid that.
What I was trying to achieve is the first lower stat unit still only being recruitable if the muster field is not present at all, which is where we started.
You then have recruit lines for one of exactly the same units that would be available for each level of your barracks being conditioned on that specific barracks level existing in the city. So if your muster field produces unit xxxx
your revolt building has
recruit "xxxx" 0 requires factions { franks, } and building_present_min_level barracks muster_field and not building_present_min_level barracks militia_barracks
That line will operate if the barracks building is present but damaged but otherwise recruitment system will remain as designed, so effectively making it look as though you can recruit the selected unit out of the damaged barracks. Concerns were whether having two recruit lines for the same unit would give duplicate icon display - but it doesn't seem to. Other problem is level of complexity needed within the revolt building especially if you also have a complex aor system (luckily I haven't) am about to test further to see if I can get everything I need in....
Dol Guldur
01-15-2007, 21:19
I see. Well, we do have a complex aor system :(
But, you may wish to test, I found that having too many recruitment lines with building conditionals in a single level caused a CTD (on opening the building scroll if I remember rightly)...or it may have been similar to the effect caused by having a bonus capability in the same. I could not get over this limit before (it was usually 4)
There's a discussion on this from around post 90 of the EDB discussion thread.
Makanyane
01-15-2007, 23:28
Yep, you can still only have 4 ACTIVE building conditioned lines in the building or it CTD's when you click it, even with hidden view thing.
Which is actually plenty for me - we have some units that are additions for specific regions but base units aren't excluded by region so I can just pick one of the base units per barracks level - hence don't actually need more than one active line per building unless I get concerned about lack of variety being produced from unrepaired barracks... , have actually got the minimum amount in now to cover all factions / levels and seems fine so far
Active line changes when next barracks is built but so long as you remember to exclude the other barracks levels you don't get multiple lines. If you've got regional units that don't overlap you could just have one unit, per region, per faction, per barracks level, which would again only give you one active line at a time. I think you're only going to get into trouble if your regional areas (or other conditions) overlap so any one city could get more than 4 of the conditioned units active in the building when its triggered by any particular barracks level.
And I wish you luck figuring that one out :laugh4:
vBulletin® v3.7.1, Copyright ©2000-2025, Jelsoft Enterprises Ltd.