Results 1 to 30 of 269

Thread: The Complete EDB Guide - discussion

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Re: The Complete EDB Guide - discussion

    Some interesting research being done in this thread, the upgrades possibilities are intriguing. One problem I've been having is the seeming impossibility of getting rid of a building in an individual region after it's been built, short of the player manually destroying it for non-hinterland.

    Has anyone found a way to destroy a building in an individual settlement without player interaction? Or even just throw it back to level 1?

    I've tried both a number of variants for the set_building_health console command, but no matter how much health hits you lump on the building can still be repaired. Furthermore I've tried making the upgrades of buildings circulating, so that under unachievable conditions the last building can upgrade into the first, effectively 'destroying' all upgrades. The create_building command doesn't seem to take kindly to being told to create a building which is lower on the list though, from cursory testing. And then there's click simulation, but I'm not aware of any way to select a specific building in the ui, so that's pretty much a dead end.

    This might not seem that useful for buildings which represent well, buildings, but it's important realistically for buildings that represent anything else, such as policies. This is especially true in games with multiple human players. For instance, if you wanted to represent a regional 'laws' system and Rome captured a Gallic settlement, you wouldn't inherit the development of law in the region, as Gallic and Roman law differ and need to be built up separately.

    One fix is of course to use multiple building trees for different factions or culture groups and just null the bonuses on the other ones. But the problem is that uses a lot of building trees, which to my understanding you can only have 128 of. Another solution would be to upgrade it to an unused 9th building which is essentially "Loot" and has no bonuses, which would prompt the player to destroy it for the monetary return. Both of these are clunky solutions though, which is why I'm curious if anyone has solved the problem of destroying(or at lead "downgrading") individual buildings in specific settlements.

  2. #2
    Anything that isn't 'member' Member Squid's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    596

    Default Re: The Complete EDB Guide - discussion

    In RTW, unlike M2TW, there is no way to delete a building. The only command that might be able to select a building card is the select_card, but I've tried and never actually got it to work. That being said to effectively destroy a building, but you could script it so that everyturn, after some event, the buildings health is set to 0, that means that it will always be useless even if the player rebuilds it.

    -Trait/Ancillary/Building Editor

    "Two things are infinite: the universe and human stupidity;
    and I'm not sure about the universe." -----Albert Einstein

  3. #3

    Default Re: The Complete EDB Guide - discussion

    Quote Originally Posted by Squid View Post
    In RTW, unlike M2TW, there is no way to delete a building. The only command that might be able to select a building card is the select_card, but I've tried and never actually got it to work. That being said to effectively destroy a building, but you could script it so that everyturn, after some event, the buildings health is set to 0, that means that it will always be useless even if the player rebuilds it.
    Well there's no way to do it in M2 either that I'm aware of. Kingdoms has the destroy_buildings scripting command, but that destroys all buildings factionwide in the chain, which has some noticeably stupid effects if you try to re-create them across all settlements, such as initial recruit pool #s being applied. So that's only an option for some things, not that many.

    The setting to 0 thing seems like it would just annoy a player, I'd opt for the 9th-level loot building before trying that since it's less obtrusive.

  4. #4
    Finder of Little Oddities Senior Member Makanyane's Avatar
    Join Date
    Jan 2006
    Posts
    2,220

    Default Re: The Complete EDB Guide - discussion

    Quote Originally Posted by Augustus Lucifer View Post
    One fix is of course to use multiple building trees for different factions or culture groups and just null the bonuses on the other ones. But the problem is that uses a lot of building trees, which to my understanding you can only have 128 of. Another solution would be to upgrade it to an unused 9th building which is essentially "Loot" and has no bonuses, which would prompt the player to destroy it for the monetary return. Both of these are clunky solutions though, which is why I'm curious if anyone has solved the problem of destroying(or at lead "downgrading") individual buildings in specific settlements.
    Does that work? When I tried adding buildings by script (which I assume is needed as player isn't going to voluntarily upgrade to useless building) it just added the new scripted building at same time as keeping old one, even though they were in same tree.... also found that scripted additions would happily add more duplicate versions of same building in same tree, if allowed to

    my problem was under alex.exe in RTW - M2 might be different, have you definitely got this to work in either?




    Only way around getting captured enemy buildings to work negatively and properly for human player without messing up AI that I found was, make separate provincial campaign for each possible playable faction, give each descr_region entry in that factions campaign a specific resource. Re-code EDB so that when the player's (only playable) faction in that campaign holds the 'wrong' building they get the appropriate neg bonuses and are forced to destroy it / get interesting choice of possible good trait emerging versus. temp bad effects etc...

    that works a lot better if you don't have more that half dozen factions ...:P
    Last edited by Makanyane; 09-24-2009 at 20:20.
    Not used mods before? Looking for something small and fun?!
    Download the:

  5. #5

    Default Re: The Complete EDB Guide - discussion

    Quote Originally Posted by Makanyane View Post
    Does that work? When I tried adding buildings by script (which I assume is needed as player isn't going to voluntarily upgrade to useless building) it just added the new scripted building at same time as keeping old one, even though they were in same tree.... also found that scripted additions would happily add more duplicate versions of same building in same tree, if allowed to

    my problem was under alex.exe in RTW - M2 might be different, have you definitely got this to work in either?
    I'm not really all that sure. From testing it I'm getting the same results you were getting though. Something curious is that when you create a building through the console it seems to completely screw up the buildings you can create. It's like the game creates a new temporary tree for the building to exist in which interferes with the main tree but is somehow built up separately. Seemingly the only way to get it back to recognizing only one building path then is to destroy all buildings of that type in the settlement. They even have a nifty greyed-out building effect that is applied when you're trying to upgrade to a building you already have in the settlement, which makes you wonder why they bothered making it read right graphically rather than just fixing some seriously bad functionality.

    Quote Originally Posted by Makanyane View Post
    Only way around getting captured enemy buildings to work negatively and properly for human player without messing up AI that I found was, make separate provincial campaign for each possible playable faction, give each descr_region entry in that factions campaign a specific resource. Re-code EDB so that when the player's (only playable) faction in that campaign holds the 'wrong' building they get the appropriate neg bonuses and are forced to destroy it / get interesting choice of possible good trait emerging versus. temp bad effects etc...

    that works a lot better if you don't have more that half dozen factions ...:P
    Yeah that's definitely one thing I've thought about before. It also would allow for other things such as more of a scripted campaign start. The problem with that for me though is it doesn't carry over to hotseat, and I'd say that's my biggest hurdle right now is trying to make some of these scripts and systems work in a hotseat game. It's easy when you can assume that if the player doesn't own it then it's owned by the AI, but that gets quite a bit more difficult when you factor in an undisclosed number of player factions. Oh well, I'll figure something out.

  6. #6
    Finder of Little Oddities Senior Member Makanyane's Avatar
    Join Date
    Jan 2006
    Posts
    2,220

    Default Re: The Complete EDB Guide - discussion

    are you actually doing this for RTW? I ask because I'd seen you mainly in M2 forums.....

    if you were doing it in M2 I think you could script the event_counters used for building effect requirements so they switch on or off according to who is local player at the time... or do the effects not calculate until overall (slave) end turn, and not each faction's end turn?
    Not used mods before? Looking for something small and fun?!
    Download the:

  7. #7

    Default Re: The Complete EDB Guide - discussion

    Quote Originally Posted by Makanyane View Post
    are you actually doing this for RTW? I ask because I'd seen you mainly in M2 forums.....

    if you were doing it in M2 I think you could script the event_counters used for building effect requirements so they switch on or off according to who is local player at the time... or do the effects not calculate until overall (slave) end turn, and not each faction's end turn?
    No it's for M2(though the query is for both, since this is a RTW thread) and yeah I'm aware of that, but I'm more talking about the buildings themselves rather than the capabilities, which is why the initial question was for either platform is it possible to destroy an individual building in an individual settlement. The answer right now seems to be no, which is unfortunate but expected. I'll figure something out.

    As for when the effects calculate, I'm not entirely sure but that's something I wish I knew more about. I've noticed odd things when I did tests with recruit pools, but it's harder to observe for some of the other effects so we have to just hope it checks and applies them all at the same time. Whether or not the data is applied at turn end effective for the next turn, or it's just data which is saved, or it's all done at turn start, and whether or not the Kingdoms "PreFactionTurnStart" preempts this or not, are all things I wish I knew for certain.

  8. #8

    Default Re: The Complete EDB Guide - discussion

    I've read up on complex building capabilities before, and I recently downloaded RTR VII Fate of Empires and had a glimpse of this building code:

    Code:
    upgrades
    {
    metal_mine1 requires factions { all, } and hidden_resource not_used
    metal_mine1 requires factions { counter_faction, mini_faction, britons, } and hidden_resource metal and not building_present_min_level hinterland_raw_materials2 metal_mine2 
    metal_mine1 requires factions { counter_faction, mini_faction, britons, } and hidden_resource metal and building_present_min_level hinterland_raw_materials2 precious_metal_mine2
    metal_mine1 requires factions { rome_republic, } and building_present_min_level roman_govt roman_govt_2 and hidden_resource metal and not building_present_min_level hinterland_raw_materials2 metal_mine2 
    metal_mine1 requires factions { rome_republic, } and building_present_min_level roman_govt roman_govt_2 and hidden_resource metal and building_present_min_level hinterland_raw_materials2 precious_metal_mine2
    metal_mine1 requires factions { carthage, } and building_present_min_level carthage_govt_B carthage_govt2 and hidden_resource metal and not building_present_min_level hinterland_raw_materials2 metal_mine2 
    metal_mine1 requires factions { carthage, } and building_present_min_level carthage_govt_B carthage_govt2 and hidden_resource metal and building_present_min_level hinterland_raw_materials2 precious_metal_mine2
    metal_mine1 requires factions { epirus, } and building_present_min_level epirote_govt epirote_govt_2 and hidden_resource metal and not building_present_min_level hinterland_raw_materials2 metal_mine2 
    metal_mine1 requires factions { epirus, } and building_present_min_level epirote_govt epirote_govt_2 and hidden_resource metal and building_present_min_level hinterland_raw_materials2 precious_metal_mine2
    metal_mine1 requires factions { gauls, } and building_present_min_level keltoi_govt kelt_govt_2 and hidden_resource metal and not building_present_min_level hinterland_raw_materials2 metal_mine2 
    metal_mine1 requires factions { gauls, } and building_present_min_level keltoi_govt kelt_govt_2 and hidden_resource metal and building_present_min_level hinterland_raw_materials2 precious_metal_mine2
    metal_mine1 requires factions { spain, } and building_present_min_level iberian_govt iberian_govt_2 and hidden_resource metal and not building_present_min_level hinterland_raw_materials2 metal_mine2 
    metal_mine1 requires factions { spain, } and building_present_min_level iberian_govt iberian_govt_2 and hidden_resource metal and building_present_min_level hinterland_raw_materials2 precious_metal_mine2
    metal_mine1 requires factions { numidia, } and building_present_min_level base_government numidia_govt_2 and hidden_resource metal and not building_present_min_level hinterland_raw_materials2 metal_mine2 
    metal_mine1 requires factions { numidia, } and building_present_min_level base_government numidia_govt_2 and hidden_resource metal and building_present_min_level hinterland_raw_materials2 precious_metal_mine2
    }
    ...
    metal_mine1 requires factions { all, } and hidden_resource metal and not building_present_min_level hinterland_raw_materials3 metal_mine3 or factions { all, } and hidden_resource metal and building_present_min_level hinterland_raw_materials3 precious_metal_mine3
    {
    capability
    {
    }
    ...
    I'm curious as to why the building code had factions { all, } and ... or factions { all,} and ... because I read up a post a few years back that stated it would not work for the second set of building conditions.

  9. #9
    Anything that isn't 'member' Member Squid's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    596

    Default Re: The Complete EDB Guide - discussion

    For the life of me I can't find where the discussion occured (old age is rearing its ugly head again) but I was involved in a conversation over which file (descr_regions.txt or descr_strat.txt) took precedence for the ability to use resources in EDB. I can now absolutely confirm that the resource entries in DS matter and must be accurate. In RS 1.6 the Numidia region appears to have an elephant resource in it (located on the shore of a lake) and has elephant listed in the descr_regions.txt entry for the region. There are two elephant units that are recruitable in regions with an elephant resource, but these units are not recruitable in the Numidia region. The reason was that if you did a show_cursorstat on the tile with the elephant on it the elephant was not actually in the Numidia region (it was in the lake/sea region). Making no other change except to move the elephant resource in descr_strat into the Numidia region fixed the missing recruitment bug.

    Here's the link to the thread where the discussion took place: Elephants not recruitable in Numidia
    Last edited by Squid; 12-14-2009 at 19:33.

    -Trait/Ancillary/Building Editor

    "Two things are infinite: the universe and human stupidity;
    and I'm not sure about the universe." -----Albert Einstein

  10. #10

    Default Re: The Complete EDB Guide - discussion

    Quote Originally Posted by lim_lucky View Post
    I've read up on complex building capabilities before, and I recently downloaded RTR VII Fate of Empires and had a glimpse of this building code:

    Code:
    upgrades
    {
    metal_mine1 requires factions { all, } and hidden_resource not_used
    metal_mine1 requires factions { counter_faction, mini_faction, britons, } and hidden_resource metal and not building_present_min_level hinterland_raw_materials2 metal_mine2 
    metal_mine1 requires factions { counter_faction, mini_faction, britons, } and hidden_resource metal and building_present_min_level hinterland_raw_materials2 precious_metal_mine2
    metal_mine1 requires factions { rome_republic, } and building_present_min_level roman_govt roman_govt_2 and hidden_resource metal and not building_present_min_level hinterland_raw_materials2 metal_mine2 
    metal_mine1 requires factions { rome_republic, } and building_present_min_level roman_govt roman_govt_2 and hidden_resource metal and building_present_min_level hinterland_raw_materials2 precious_metal_mine2
    metal_mine1 requires factions { carthage, } and building_present_min_level carthage_govt_B carthage_govt2 and hidden_resource metal and not building_present_min_level hinterland_raw_materials2 metal_mine2 
    metal_mine1 requires factions { carthage, } and building_present_min_level carthage_govt_B carthage_govt2 and hidden_resource metal and building_present_min_level hinterland_raw_materials2 precious_metal_mine2
    metal_mine1 requires factions { epirus, } and building_present_min_level epirote_govt epirote_govt_2 and hidden_resource metal and not building_present_min_level hinterland_raw_materials2 metal_mine2 
    metal_mine1 requires factions { epirus, } and building_present_min_level epirote_govt epirote_govt_2 and hidden_resource metal and building_present_min_level hinterland_raw_materials2 precious_metal_mine2
    metal_mine1 requires factions { gauls, } and building_present_min_level keltoi_govt kelt_govt_2 and hidden_resource metal and not building_present_min_level hinterland_raw_materials2 metal_mine2 
    metal_mine1 requires factions { gauls, } and building_present_min_level keltoi_govt kelt_govt_2 and hidden_resource metal and building_present_min_level hinterland_raw_materials2 precious_metal_mine2
    metal_mine1 requires factions { spain, } and building_present_min_level iberian_govt iberian_govt_2 and hidden_resource metal and not building_present_min_level hinterland_raw_materials2 metal_mine2 
    metal_mine1 requires factions { spain, } and building_present_min_level iberian_govt iberian_govt_2 and hidden_resource metal and building_present_min_level hinterland_raw_materials2 precious_metal_mine2
    metal_mine1 requires factions { numidia, } and building_present_min_level base_government numidia_govt_2 and hidden_resource metal and not building_present_min_level hinterland_raw_materials2 metal_mine2 
    metal_mine1 requires factions { numidia, } and building_present_min_level base_government numidia_govt_2 and hidden_resource metal and building_present_min_level hinterland_raw_materials2 precious_metal_mine2
    }
    ...
    metal_mine1 requires factions { all, } and hidden_resource metal and not building_present_min_level hinterland_raw_materials3 metal_mine3 or factions { all, } and hidden_resource metal and building_present_min_level hinterland_raw_materials3 precious_metal_mine3
    {
    capability
    {
    }
    ...
    I'm curious as to why the building code had factions { all, } and ... or factions { all,} and ... because I read up a post a few years back that stated it would not work for the second set of building conditions.
    Obviously "requires factions { all, }" isn't needed since the result is always true, it just looks better to have a "requires factions { x, }" I guess :P

    Though since we did add the faction requirement, it seems logic to me that it has been added two times. Because the "or" in that line, splits the requirement in two parts. Meaning that if you would only have one faction requirement, the first part of the requirement does have a faction requirement, while the second part (after the "or") wouldn't have a faction requirement. I didn't get any errors or something with it, so even if it does get ignored, it's always true anyway... So who cares? :)

    RTR VII Developer

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO