Log in

View Full Version : discovered nice feature for buildings...



Black Crow
11-03-2005, 03:22
ok, i was doing my mod, almost finished just to say... i take a rtrt 6.2 with bug fix 6.3 for start mod... so i put the senate building, the triumphal arch, and put others 7 (SEVEN!!!) buildings to make my academic mod, i then se a problem come up, the hard coded limit for building are 64, and i have 67... so i was desapointed because i dont know how to make those shrink...

and i make a very discovery...
i add a building named option, then put in the update lines 3 others buildings
and in dont put update in any other of them, so theoricaly if i built the option then i will have the 3 options and when i build one of them the others two will not appear to build, ok ?
that exactely whats happened...

here´s the line of the test :

upgrades
{
academy_management
academy_military
academy_politics
}

i have never found something like options to built tutorial in this forum, so i post... and i know this is not the right forum, but i dont have privilege to use the buildings and units forum...

ok ok for know this allow modders to build more complex buildings

like

base -o- option1
|
o- option2 -o- option 3
|
o- option 4

without having to use an other building complex and the unliked

and not buildingblablablabla type level a hundread times...


other discovery (i belive) is to use multiple alike bonus in the line, for example

wanna give 100% law order for the roman senate building bonus...

i put the lines :

capability
{
law_bonus bonus 6 (+30)
law_bonus bonus 6 (+30)
law_bonus bonus 6 (+30)
law_bonus bonus 2 (+10)
}

and any problem, these were not mentioned in others posts i belive

i would be making more tests and making a ultimate building tutorial, since a lot of those that i have seen are incomplete or look preferencialy at diferent areas thath dont complete eachother...

if these discoveries are know please post here, hehe i dont see this in any post so i post here to help all modders...

i allways ask for help, its time to help =)

as epistolary said : cool modders help eachother


ps. please moderators move this to building and units if this are a discovery

thx everyone

Dromikaites
11-03-2005, 09:48
It is a great discovery Black Crow. Excellent work!

The_Mark
11-03-2005, 10:43
Beautiful! ~:cheers:

On which version (1.2, 1.3, BI) was this based? And another question, is the buildings per complex limit still an issue with your discovery?

Black Crow
11-03-2005, 11:06
ok, i´m going to work now, at 12:00 ill make more tests if anyone wanna make them =) its nice to know that i have contributed with the comunity, i think the complex buildings limits (with 5 per complex) are undone

Dol Guldur
11-03-2005, 13:08
Great work, Black Crow.

I only got as far as this in the EDB Guide:


upgrades...Note that the latter is quite correct to be in the plural - you can list more than one upgrade...

Though I did a few tests of my own in "jumping" buildings and expanding into the village level (does not appear in the building browser though, so best reserved for "processes" rather than physical buildings) I have not had the time to get much further. - But it is possible to have more than 5 levels on a building type's tree, and more than 1 building per level. However, again I would reserve these to processes else the building browser cannot reflect it. I have not tested for maximums (or much by way of implication in this regard), and I have not had much interest in looking beyond 64 complexes as I considered it enough for my needs.

I will keep an eye on your findings and add a link into your work in the Guide once I find time...

Dang, I wish I had more time...anyone wanna help out on the Fourth Age coding team to free me up for more research? :)

Black Crow
11-03-2005, 16:50
i have apllied for the the forth age code modders team, but they dont accept me, i think i was too nb in that time for get into a too much promissing project wwithout any skills, as i see i dont know about the more than 5 building by complex thing... as i figure that : each building complex may have 5 levels, thats what i have read in the forums and was trying to work on, but noone know if these limitations are about the amount of levels or in the amout of upgrades that you may do, for example if it is for the upgrades line, assuming that you may have one building being upgraded 5 times, that let you make a LOT of buildings for example Amay upgrade to B,C,D,E,F... and each of those may upgrade to 1,2,3,4..., this may be too unrealistic, as i would allow that a building may go to as option and be upgraded in a lot of options and each one of them may be upgraded in a lot... but if the problem of the "hard-coded number permited" be linked to the amout of upgrades than we may have a lot of things to do, and build...

if the system works like this :

name of the building ammount of upgrades
A 0
B 1
C 1
D 1
E 1
1 2
2 2
3 2
4 2
x 3

etc, we may have the ammount of building that we wanna until the 4 number of upgrades be satisfied...

gonna research about this =)

oly for now i can say that in my code, i build the building academic_department and then i have 3 options and all of the 3 options appears in the building browser and if i select one of them, the others 2 disapear, no problem after ione of the 3 buildings are finished construction, wich makes me think that you may use this att will, but i have not tested this for more than 10 turns... no garantee

questions :

*will it allow the number of buildings per complex be increased ?
*will it have a max number of upgrades listed ? for example works only if there are 4 upgrades listed...
*are possible to link an upgrade to be a building of another building complex ?

make me think of it :
*wich are hardcoded ? buildings levels of number of upgrades per building ?
*just to know the limits of the upgrades command line.
*if so we will be able to make a base building that may link any barracks of any faction or any temples for any faction, that if we were allowed to make more than 5 buildings per complex will let us unlock or reuse a LOT of building complexes... just the temples are using (in rtr 6.3) 21 buildings complexes slots... and the barracks (with the ZOR and auxilia and barracks per faction) are using 18 buildings complexes slots, with these discovery if it is true OF COURSE, we will be able to make (21+18=39) 39 buildings complexes to be cleared and we will of use 2 (TWO!!!) slots of these 39, that will release 37 (!!!) building slots for us to use...


any help in tests or information will be usefull... i would apreciate if this became a research thread about this...

The_Mark
11-03-2005, 19:13
It seems that at least one limit can be removed with this. I combined the stable and ranged complexes, resulting in a working eight-building complex with two branches.

Black Crow
11-03-2005, 19:34
does evert building on the complex works right ?

Dol Guldur
11-03-2005, 19:46
Check the building scolls (esp. bonuses/recruitment etc.), I seemed to remember some anomalies there when I was playing around with this area some time ago though I can't remember what they were exactly.

Black Crow
11-03-2005, 20:50
Check the building scolls (esp. bonuses/recruitment etc.), I seemed to remember some anomalies there when I was playing around with this area some time ago though I can't remember what they were exactly.


i have made the same test but for buildings that does not cointain any recruitment thing... just bonuses..

i have done by this way

......-B-............-3
A.o--C--1---2---4
......-D-............-5
0u...1u..2u...3u...4u

u=>number of updates suffered by that building

9 buildings 4 updates that lead me for a 5 stages but a unlimited number of buildings inside a complex allowed...

the images of any building were not compromissed, the text (desc or title) were not compromissed by any building...

as i use the same bonus for buildings from the same stage i can only say that i haven´t found any bonus errors or anomalies in those, but we can have a margin of errors since the B and C and D have the same bonuses like the 3 and 4 and 5

for now the aswers :

1*the number of buildings by complex are unlimited but we can only have 4 updates or 5 stages for any building complex, that means that you cannot made a just upgrade building, but you can do a base building and from that make the choice for a number of units to be cascade (put for example, a base named tows base and let the player choose for trade improve, public law improve or growth bonus improve for the tows... i have tested this for about 3 options, if any one tested it for more options please let be know)

2*don´t know the answer

3*not know for now

alpaca
11-03-2005, 22:20
Nice find. This definitely makes building_present_min_level very interesting in the edb.
If I have time I'll maybe do some research on this, too.

The_Mark
11-03-2005, 22:41
Exactly. The effects of branching upgrades on the building_present_min_level have to be researched.

Teleklos Archelaou
11-03-2005, 23:13
Crap. I just got a "you have exceeded the maximum number of levels" message. But I only have three real levels. I do however have a lot of what the code thinks of as "levels" I have 14 so I don't know what the limit is but it's beneath that (somewhere between 8 and 14 I think).

I have 14 items in the third line of the complex's code, where it says "levels". This is too many for it it seems. Anyone finds a way around that, please let me know.

edit: 9 seems ok. 10 causes problems. gah! Oh well, it was a nice dream while it lasted. ~D It certainly will help some things though, I don't mean to belittle it at all. It will allow variants of certain buildings where the graphics were only showing one type - or maybe if you want different costs/build times for different variants.

alpaca
11-03-2005, 23:26
Unfortunately the level limit is 9.
You have to specify every building in the level line and you can't add more than 9.
This limits the amount of maximum possible buildings to 576, in reality probably to something about 400.

I tested the building_present_min_level and I'm sorry to say that if you have a line like this:

levels 1 2 3 4 5 6 7

with the upgrades 1->2->3->4 and 1->5->6->7 and give 6 a building_present_min_level 4 it can be built :(

The_Mark
11-03-2005, 23:36
I tested the building_present_min_level and I'm sorry to say that if you have a line like this:

levels 1 2 3 4 5 6 7

with the upgrades 1->2->3->4 and 1->5->6->7 and give 6 a building_present_min_level 4 it can be built :(
That's not necessarily a bad thing. What would be good to know is that if we had some other building with the condition building_present_min_level 4 that would be triggered by having building 6 in the settlement.

alpaca
11-03-2005, 23:51
The problem is it is a little more difficult to differentiate between the building trees.

Workaround:
If you want the first tree:
building_present_min_level 2 and not building_present_min_level 5

If you want the second one:
building_present_min_level 5

You'll have to keep the different trees apart from each other though, like I did in my example.

Black Crow
11-04-2005, 00:18
ok lets figure out our knoledge about it for now :

- are possible to make buildings for options, for now you can put 1 building to be upgraded in to 8 different buildings.

- we have to respect the 9 building levels, as i thought i was unlimited since the hard-coded problem should be the "stages" or number of upgrades suffered by the building... this probability are gone, we HAVE a building per complex cap, its 9, and this is a important find, as we can use this in a lot of issues... but the hard-coded thread it says that the limit of buildings per complex is five, not true, the limit of stages per complex its 5 BUT the limit of levels or constructions are 9 per complex, wich let us with more buildings to manage or create and be creative :)
(Black Crow´s, alpaca´s and Teleklos Archelaou´s find)

- we have a building max limit of 547, but in reality its about 400 (i didnt know that until now)
(Teleklos Archelaou´s find)


- as we expect the buildings levels are not linked between themselves as they are linked for the upgrade setting, for example :

academic
academy scriptorium ludus_magnus

if you refer to level 3 that its the ludus_magnus to be the minimal level it will work because academy its linked by the upgrade line to scriptorium and that to the ludus_magnus
(The_Mark´s find)

- until 9 levels no problems with the images description titles or bonuses were found
(Black Crow´s find)

Not solved questions (by test):

*will it have a max number of upgrades listed ? for example works only if there are X upgrades listed... (will X have a limit ? for now we know that are 8 because we have a hard-coded limit of levels)
*are possible to link an upgrade to be a building of another building complex ?

just to organize...

we are working this on rtw v1.2 (well... i am)

there are any questions or possible sugestions for us to test ? for now i´m without ideias

"Oh well, it was a nice dream while it lasted." - by Teleklos Archelaou

i dont think this were an unfruitfull thread (i know you dont mean that) this let us know a lot about buildings, but really take out a dream : the unlimited limit for the buildings numbers, that ok, with our finds and a few braincells we can solve a lot of problems and imprement complex buildings trees to our players =)

thx all for participation

Dol Guldur
11-04-2005, 01:21
Good research.

I have linked to this thread and slightly edited the Complete EDB Guide at https://forums.totalwar.org/vb/showthread.php?t=50439

I need to get time to add in some other things I've been meaning to insert for some time as well :(

If anyone feels like writing a bit for me to insert, feel free - I intend for it to be the one-stop place for all things EDB you know ;)

Black Crow
11-04-2005, 01:51
Good research.

I have linked to this thread and slightly edited the Complete EDB Guide at https://forums.totalwar.org/vb/showthread.php?t=50439

I need to get time to add in some other things I've been meaning to insert for some time as well :(

If anyone feels like writing a bit for me to insert, feel free - I intend for it to be the one-stop place for all things EDB you know ;)

law_bonus (public order bonus due to law) 1-5 (5-25%)

i have seen and used (in my senate building) the bonus to law in 6 order... that allows you to have 30% bonus to law

and you can put other similar bonuses in the capability... they are not limited to one mention per type of capability, dont find any limits for it, but i´m sure that it may exist as anything in this may be hard-coded:

"wanna give 100% law order for the roman senate building bonus...

i put the lines :

capability
{
law_bonus bonus 6 (+30)
law_bonus bonus 6 (+30)
law_bonus bonus 6 (+30)
law_bonus bonus 2 (+10)
}"

Teleklos Archelaou
11-04-2005, 02:01
That looks correct BC, - except I didn't come up with the 400 limit number. That must be someone else.

Good work in finding this out. Definitely.~:cheers:

Black Crow
11-04-2005, 02:39
ups, sorry was alpaca =)

Dol Guldur
11-04-2005, 09:34
Yep, and that was definitely something I did not know; I will add it when I get time along with a few other bits - I'd like to do my own testing too, when I get time. This is a great find.

I think a proper tutorial might be in order - as you may know, the EDB Guide is intended to convey the principles of understanding and coding the EDB file, not the implications and many applications of those principles. This is one of the reasons I never included my own small application of multiple upgrades (to "jump" buildings, as I was using it), but only mentioned that they could be inserted.

I look forward to the continuance of this thread.

EDIT: I assume you mean that multiple instances of the same capability can carry conditions relevant to each region (resource/hidden resource) or faction/culture? You could of course just put the single line "law_bonus bonus 20" to get 100%.

alpaca
11-04-2005, 15:58
Uh sorry guys, there was a misunderstanding.
The maximum number of buildings is 64 * 9 = 576 (9 buildings for each of 64 complexes)
I said about 400 because I estimate there'll be a loss of about a third of the building slots because we can't use each complex to its full complexity (if you excuse the pun), and some building complexes probably will have only 5 buildings in them.
You can't link upgrades to different building trees because every upgrade has to be listed in the level line after the building you are doing the upgrade for.
That means:

levels building_1 building_2

Another complex:
levels building_3

building_1 can have building_2 as an upgrade but building_2 can't have building_1 as an upgrade.
Both can't have building_3 as an upgrade and vice-versa.

Black Crow
11-04-2005, 16:48
Yep, and that was definitely something I did not know; I will add it when I get time along with a few other bits - I'd like to do my own testing too, when I get time. This is a great find.

I think a proper tutorial might be in order - as you may know, the EDB Guide is intended to convey the principles of understanding and coding the EDB file, not the implications and many applications of those principles. This is one of the reasons I never included my own small application of multiple upgrades (to "jump" buildings, as I was using it), but only mentioned that they could be inserted.

I look forward to the continuance of this thread.

EDIT: I assume you mean that multiple instances of the same capability can carry conditions relevant to each region (resource/hidden resource) or faction/culture? You could of course just put the single line "law_bonus bonus 20" to get 100%.

don´t know... maybe there may be a hardcoded limit for the number after the bonus, i can say that i have seen until the number 6 to law bonus, so the law bonus can go to 30%, gonna make a test now to know if there is a limit for the number after the bonus, there may be, its not like CA to let you put a number like 5021286 to solve the problem with revolts in rome for example, its just not like CA may have done, i think there may be a limit

alpaca
11-06-2005, 16:38
Uh I think the upper limit will be 32768.
I didn't fully test it but e.g. a law bonus of 80 (400%) is no problem and works fine.
It's not like a programmer will include a limit when he doesn't have to (you save code and cpu time).

counterfeit
01-08-2006, 16:15
[QUOTE=

here´s the line of the test :

upgrades
{
academy_management
academy_military
academy_politics
}

[/QUOTE]

Can you make different cappabilities for the different upgrades, and do you list all the upgrades in the levels line?:inquisitive:

nikolai1962
02-19-2006, 05:10
Can you make different cappabilities for the different upgrades, and do you list all the upgrades in the levels line?:inquisitive:

Yes to both.

Example, an ebil barracks complex where the ebil player can build either orc or human barracks. The first level is common to both and could have capabilities of its own. After this level the player could either build an orc barracks upgradeable to an uruk barracks *or* a human_barracks upgradeable to a human_elite_barracks, each barracks having its own capabilities.

You can have up to nine buildings in a complex so in this example you could in theory have 4 levels of barracks for each path plus the base building or alternatively 4 seperate types of barracks with 2 levels each etc. The capabilities for each building level can be any of the allowable ones and not limited to troop recruitment.

building ebil_barracks
{
levels foundations orc_barracks uruk_barracks human_barracks human_elite_barracks
{
foundations requires factions { sauron, }
{
capability
{
}
settlement_min village
upgrades
{
orc_barracks
human_barracks
}
}
orc_barracks requires factions { sauron, }
{
capability
{
recruit orc_warband 0
}
settlement_min town
upgrades
{
uruk_barracks
}
}
uruk_barracks requires factions { sauron, }
{
capability
{
recruit uruk_warband 0
}
settlement_min large_town
upgrades
{
}
}
human_barracks requires factions { sauron, }
{
capability
{
recruit human_warband 0
}
settlement_min town
upgrades
{
human_elite_barracks
}
}
human_elite_barracks requires factions { sauron, }
{
capability
{
recruit human_elite_warband 0
}
settlement_min large_town
upgrades
{
}
}
}
plugins
{
}
}

(nb example code is stripped down a bit, construction time etc left out, but hopefully makes the principle clear.)