thanks for the answer, while it sucks its better to know.
dark89
thanks for the answer, while it sucks its better to know.
dark89
I'm interested in this, can you give us an example of it in action?Originally Posted by Dol Guldur
Epistolary Richard's modding Rules of CoolCool modders make their mods with the :mod command line switch
If they don't, then Cool mod-users use the Mod Enabler (JSGME)
Cool modders use show_err
Cool modders use the tutorials database
Cool modders check out the Welcome to the Modding Forums! thread
Cool modders keep backups
Cool modders help each other out
These threads may shed some light on the subject:Originally Posted by Epistolary Richard
https://forums.totalwar.org/vb/showthread.php?t=50433
https://forums.totalwar.org/vb/showthread.php?t=50439
Yes they do, though I really should point out on that Wonders' thread that you'd better be sure what the exact Wonder effect is, as if it decays you'll eventually end up with a permanent penalty if applying a negation : though, that said, some effects only reduce an existing bonus rather than have the capacity to create a negative.
The principle is there though - you simply designate a resource to a certain region, when the faction captures that region the faction-wide capability kicks in (because it is predicated upon the existence of that resource). You can of course create a different capability for each faction.
To ensure the code is parsed you'll need to place it in a building that must exist at that region's settlement. All non-village settlements must have core_buildings (government buildings) so you can place it in each level of that tree.
It's been heavy going at the Fourth Age but I've managed a small update to the EDB Guide.
1. I have added in that the "other" category of buildings for the cost and build-time bonus seems to also apply to military buildings.
2. I have added that you can have more than 5 levels within each tree...
You can have a building for village, town, large town, city, huge city, large city and even attach more than 1 building to any level.
I've not tested the maximums; I am not too interested in this as I want my building browser to display correctly and that only shows 5 buildings - so unless you make perhaps the village "building" a process (such as representing colonization for example) rather than a physical building it seems messy to me.
3. Upgrades
I'm not sure if anyone knows this but I was wondering the other day why that word ("upgrades") is in the plural. I tested my theory out by putting a second upgrade in that section and it worked!
The implications of this have not fully dawned on me but here is a somewhat silly example of what you can now do...
t1=Palisade
t2=Wooden Wall
t3=Stone Wall
t4=Gold Wall
Let's say you don't want stone walls unless there is a "granite" resource available. Currently, a negative test for this not only blocks the stone wall but all upgrades. So your region with no granite may never build gold walls even if it has a stack of gold...
With the 2 upgrade lines you can now add "Gold Wall" after "Stone Wall" in the Wooden Wall's Upgrades section of code.
This will allow you to build the Gold Wall on level 4 even if it has no stone.
This does need to be explored and tested more. I trust someone with more time will add to this (?).
In other words, we can now leap buildings in a single bound :)
P.S. And no, I have still not worked out what building_factions does - Jerome, please........???? Please?
Last edited by Dol Guldur; 09-22-2005 at 11:27.
Ok, one more answer ;) "building_factions" appears to be a condition you can use instead of "factions" in export_descr_buildings.txt; the difference is that "factions" is a condition on the faction who currently own the building, while "building_factions" is a condition agains the faction who originally built the building. Keep in mind that this is old code and probably has not been tested for quite a long time.
"All our words are but crumbs that fall down from the feast of the mind."
-- from 'The Prophet' by Kahlil Gibran
Initial test (will be updated)
Changed faction creator of roman settlement A to parthia in descr_strat.txt
In EDB added following line under muster_field capabilities (muster_field being a building declared in settlement A in the descr_strat.txt file):
Result (playing as Roman): Building scrolls stated the unit was now available in *all* regions with muster_fields - not just Settlement A :(recruit "east infantry" 0 requires factions { roman, } and building_factions { parthia, }
Actual unit was not recruitable anywhere though!
Will continue test but would request others also do so. Thx.
UPDATE:
Test: Settlement A has faction creator of Parthia but listed under Parthia in descr_strat....(i.e. they begin with it as well as building it)
results (playing as Parthia) = scroll displays correctly / recruitment of unit possiblerecruit "east infantry" 1 requires building_factions { parthia, }
Test (using last EDB code line above): Settlement A has faction creator of julii but listed under Parthia in descr_strat....(i.e. they begin with it but it was built by romans)
results (playing as Parthia) = scroll displays correctly / recruitment of unit possible
Conclusion: either faction creator is of no relevance or building_factions is not functioning as it should.
Last edited by Dol Guldur; 09-22-2005 at 13:53.
Updated EDB Guide.
1. building_factions, not that it works yet, can only be used in the capability lines.
2. The correct format and use of the building_present requirement is:
building_present BuildingType
e.g. building_present smith
This will test true if any level of smith is present. So this requirement tests for building types rather than a minimum level of building within a building type.
Anyone else got anything to offer? ;)
First, thanks for this thread and the EDB guide. Very useful.
Second, I had been playing with "building_factions" myself too and I got some results to report. Sort of mixed, I'd say, but some of it seemed promising. The problem is that I'm not getting consistent results for both bonuses and unit recruitment. Seems to work for the former but not, or differently for the latter. Anyway, I'll tell you what I did and see what you guys think and maybe it'll be helpful for someone.
So, syntax like "bonus X requires building_factions {faction A, }" seems to work. Bonus X is only effective when faction A built the structure that grants it.
I used a building that both Armenia and Parthia could build and used this code:
Playing as the Armenians, I gave the building to the Parthians in descr_strat.txt and the Armenian built it in the first turn. I also placed a large Armenian army next to the Parthian city and used it to conquer it in the first turn too.Code:law_bonus bonus 3 requires factions { armenia, } and building_factions { armenia, } happiness_bonus bonus 3 requires building_factions { parthia, }
Next turn, the structure built by the Armenian was granting them 15% extra law and no happiness, while the captured one was giviing 15% extra happiness and no law bonus. Then, I destroyed the building in the Parthian city and rebuilt it. When it was done it provided 15% law and no happiness.
So, it seemed to work. The bonuses could be granted depending on which faction had built the structure. I suppose that by using syntax like "requires faction A and building_factions faction A", we can preclude the bonuses of captured buildings applying to the capturing faction.
However, I also used the following code:
The structure build by the Armenians recruited Cataphract Archers, sadly so did the one captured by them, but built by the Parthians. The latter did not produce Cataphracts.Code:recruit "east cataphract archer" 0 requires factions { armenia, } and building_factions { armenia, } recruit "east heavy cataphract" 0 requires factions { armenia, } and building_factions { parthia, }
So, I am confused. It's not exactly that "bulding_factions" has no effect at all over recruitment, as I think Armenians should have gotten the Cataphracts if it were so. Moreover, earlier I had tried:
Then, structures built by the Parthians recruited Cataphracts, but not Cataphract Archers, while the converse happened for those built by the Armenians.Code:recruit "east cataphract archer" 0 requires building_factions { armenia, } recruit "east heavy cataphract" 0 requires building_factions { parthia, }
I am somewhat lost. I used two slightly different installs (I play a mod) for the first and second run of tests and I wonder if that may have had an inluence, though I sort of doubt it.
That's it. Ideas? suggestions?
I wonder if negative bonuses actually work like they should in BI. Anyone know? It would be nice to give some buildings negative population growth bonuses and some things like that.
One question about hiden resources: Can they be used to disable the recruitment of units? For example, take Rome (the city/province) which has the hidden resource "Rome" that allows First Cohorts to be build. Now, could that be used in a way that it allows only First Cohorts and nothing else to be build? Much like the pre-marius units have the "NOT Marian Reforms" building condition.
hidden resources are static, Marian Reforms are an event and thus not static (they have two separate states: pre and post).
To disable a unit that starts the game recruitable you must have an event; a hidden resource cannot provide this.
The unit's recruitment could be conditional upon the presence of a hidden resource at a certain level of a building, the earlier buildings giving unconditional access to its recruitment. Of course, the player or AI might not want to build the building if it loses the unit but then again it might not want tolose any other bonuses/units that come with that building.
This would be the same as making a unit non-cumulative on a level of the tech tree except that, where the resource/hidden resource is used, it would give you the option of having the unit still available in areas with/without the hidden resource.
I can see little application for this though ;)
Scripts aside, the only aspect of the game that offers timed conditionals is buildings because they have construction times and required upgrades - hence such things as colonization in some ZoR systems.
The purpose is I´d like to have the AI build only Praetorian Guards in Rome, no other infantry.
Now, I could delete all kinds of existing barracks in Rome, but that wouldn´t keep the AI from building them and thus gaining access to other infantry units.
Restate: You wish only Praetorian Guards to be built in the city of Rome and no where else - and for that unit to be the only infantry unit Rome can build.The purpose is I´d like to have the AI build only Praetorian Guards in Rome, no other infantry.
Now, I could delete all kinds of existing barracks in Rome, but that wouldn´t keep the AI from building them and thus gaining access to other infantry units.
Is that right?
If so, you could require the hidden resource of "rome" NOT to be present in order to build all other infantry troop types in all barrack levels, except the PGs of course who would take the positive conditional.
Or you could simply disallow the building of barracks in Rome altogether, again by making the absence of the hidden resource "rome" requisite for barrack construction. Then simply attach the PGs to a building unique to Rome or to an existing building with the "rome" conditional in the positive.
That was precisely what I was asking, whether that´s possibleIf so, you could require the hidden resource of "rome" NOT to be present in order to build all other infantry troop types in all barrack levels, except the PGs of course who would take the positive conditional.![]()
Angadil,
I am sorry. I did not thank you for your post and testing. I have added a comment in the Guide that testing of building_factions can be found in this thread. Did you discover much more? I think it's not working as it should and may prove a fruitless effort :( Pity.
I have also updated the EDB guide for the new religious capabilties.
Is there any way to have a different requirement for constructing a building for one faction, but not for another? Could I have any form of this that would work?
requires factions { thrace, } and buildingalpha or { macedon, } and buildingzeta
Or maybe is there any other way to have a variation between requirements?
I don't think we can use brackets in the edb file so more complex logical stuff isn't possible.
You could add another version of the building to simulate this behaviour.
Your example would probably require thrace and buildingalpha and buildingzeta as thrace and macedon at the same time is impossible.
Yeah, I'm at building complex limit though. So trying to find a way to have different requirements for differnet factions for the same building.Originally Posted by alpaca
It's really disheartening that the conditionals blow such huge chunks for this, when so much more is so close to being achieved... oh well...
I think you're right about the problem of different conditionals for different factions. But I'm finding other added problems in this regard.Originally Posted by alpaca
If you remember the question about "invisible buildings" as the symbol for technologies acquired through espionage, I succeeded in scripting the process. I tried to put another "defense" type of building, called barbarian_defense with three levels: wall_tech, stone_wall and large_stone_wall. Although everything worked perfectly, the new walls were not present in the battle field (nor in the campaign). As they don't substitute the former wooden_walls, the new stone_wall is a sort of "phantom" building, that can be destroyed (in contrast with the normal wall).
Thus I had to return to the previous idea, to include the wall_tech building as a requirement for the normal stone_wall. But in this way the barbarian factions are limited to this level, as they cannot upgrade the settlement to large_city, requirement for the large_stone_wall.
I think this problem doesn't exist for buildings that are not present in the battle map, but I need some more testing in this regard.
Yes the undestroyable buildings can be a pain - they are the buildigns that are reflected in a visible presence on the campaign map - but in another way they are good as they give the modder the knowledge that they have some control over what the player may or may not do to certain road, city set ups, etc.
Of course, Monk, the answer to your problem with the walls is to install BI ;)
Well, it is said that BI will be available tomorrow in Spain (Spanish)Originally Posted by Dol Guldur
![]()
What is the new feature that will solve my problem?
Perhaps an update of the guide for BI (RTW 1.3) would be of great help.![]()
![]()
Hum. Well, since EB is using scripts anyway, you could have the script check the conditions you want and add a dummy building when the faction and other requirements match up, then have the building requirement use "building_present whatever" to check for the exact building (as opposed to building_present_min_level, which would also return true for higher levels). Of course, you might still have a building limit problem, and removing the building if the requirement is no longer applicable might be tricky, but the former is reduced from the original problem (or perhaps eliminated entirely if you can have unlimited building entries per complex level), and the latter is tolerable if there's no workaround.Originally Posted by Teleklos Archelaou
That would work for one building, but then to make that differentiation for other ones, we would need a whole new building I would think. We are almost at the limit now, so yeah, I guess we're just screwed in respect to trying to have different building-level-acquisition for different factions. (cries.... again...)Originally Posted by Simetrical
Maybe test the many-buildings-per-level thing which couldn't be built, but might possibly be scripted in. One complex would do then, if we have a script check each faction-owned province for the combination of buildings you want, and then pop in the building to be used as pre-requisite.Originally Posted by Teleklos Archelaou
If it works, you may also be able to use the faction_created (or whatever it is called) conditional on it to ensure that new factions don't take it over and use it. If it works, we could theoretically have one building per faction for that complex.
More than one building can be added per level, though I have not tested maximums - nor have I tested it with undestroyables.
And it is my understanding that building_present tests for the building type and not the exact building (so it would test for "barracks" instead of "army_barracks" for example, and result as true if any level of barracks were present).
Maybe you can restate what you want, Monk?
I meant that BI has all 5 levels of wall for Barbarians.
Well, in my copy of BI barbarians have only 3 levels of wall and there are no traces of the other two in the different folders.Originally Posted by Dol Guldur
What I've seen is that it has been eliminated the settlement level limit (I hope), as the barbarians can build proconsuls_palace and even imperial_palace. This is in theory, as I haven't tested this point yet. So it would be possible to assign all kind of buildings to the barbarians.
Monk,
I must apologize. I thought I had looked up the EDB file for barbarian defences - my notes and charts on this particular remained from the PRIMA Official Game Guide which clearly has listed the barbarian wall levels incorrectly.
But yes, you are right that barbarians now have 5 core buildings, which means they can be assigned all buildings.
I'm going to double-check all my walls now ;)
Yeah, that's the most important point, as you can design completely the construction tree after the hard-coded issues have been eliminated.Originally Posted by Dol Guldur
![]()
Thus, your idea was right, although some modding work is still required.![]()
Bookmarks