Results 1 to 30 of 37

Thread: A quick question from a modding newbie...

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Ashes to ashes. Funk to funky. Member Angadil's Avatar
    Join Date
    May 2004
    Location
    Madrid, Spain
    Posts
    2,242

    Default Re: A quick question from a modding newbie...

    Pode: Well, I'm honestly starting to think that you're right and RTW just dislikes me... I've tried every variation I could think of in spelling, punctuation, spaces... and it CTDs with admirable consistency as soon as I put a building in the recuiting requirements of a unit. Could I see an example of what you are using, Pode? Could anyone tell me what may be wrong with the following: recruit."barb.horse.archers.scythian"..0..requires.factions.{.scythia,.}..and.building_present_min_l evel.market.traderEndofline (dots indicate spaces)

    Thanks
    A.
    Europa Barbarorum. Giving history a chance.

  2. #2

    Default Re: A quick question from a modding newbie...

    Copied and pasted directly out of my file

    recruit "east hoplite" 0 requires factions { pontus, } and building_present_min_level smith blacksmith

    Now, I did try to link peasant recruitment to farms and got nothing but CTDs. Maybe it depends on .. . hold on, eureka moment . . . GOT IT!

    The building you're making a prerequisite must be able to train a unit already. Farms and traders didn't work for us because they don't allow the training of any units in vanilla. Smiths work because they allow training of chariots.

    Now, I wonder if I change the recrutiment of peasants from being a governor's building capability to a farm capability, I can make recruting stuff depednent on farm level?
    "Let us wrestle with the ineffable and see if we may not, in fact, eff it after all." -Dirk Gently, character of the late great Douglas Adams.

  3. #3
    Senior Member Senior Member Duke John's Avatar
    Join Date
    May 2003
    Location
    Netherlands
    Posts
    2,917

    Default Re: A quick question from a modding newbie...

    The building you're making a prerequisite must be able to train a unit already. Farms and traders didn't work for us because they don't allow the training of any units in vanilla. Smiths work because they allow training of chariots.
    Excellent find! I'll just sticky this for the time being untill it gets put into a guide. It will save quite alot of frustration when modding.

  4. #4
    Ashes to ashes. Funk to funky. Member Angadil's Avatar
    Join Date
    May 2004
    Location
    Madrid, Spain
    Posts
    2,242

    Default Re: A quick question from a modding newbie...

    Quote Originally Posted by Pode
    The building you're making a prerequisite must be able to train a unit already. Farms and traders didn't work for us because they don't allow the training of any units in vanilla. Smiths work because they allow training of chariots.
    Beautiful. I can't tell you how helpful this should be for my efforts. The frustration Duke John mentioned was definitely reaching dangerous levels in my case. Deeply indebted

    Thank you
    A.
    Last edited by Angadil; 02-23-2005 at 11:07.
    Europa Barbarorum. Giving history a chance.

  5. #5
    Ashes to ashes. Funk to funky. Member Angadil's Avatar
    Join Date
    May 2004
    Location
    Madrid, Spain
    Posts
    2,242

    Default Re: A quick question from a modding newbie...

    Minor addiition: I've been fooling around some and it seems that units recruited in core buildings cannot have another building in their recruiting requirements. Buildings which work perfectly as condition for units recruited in, for example, barracks would cause a CTD as soon as I tried to make them a prerequisite for units recruited by core buildings.

    Can anyone else confirm this, or elaborate on it?

    A.
    Europa Barbarorum. Giving history a chance.

  6. #6

    Default Re: A quick question from a modding newbie...

    Another excellent theory, Angadil. It would also explain why recruiting peasants with a farm requirement barfed. Alas, I'm at work and can't test our two hypotheses. You're saying that units recruited at a governor's X cannot be made dependent on any other building. My theory is that recruitment of any unit cannot be made dependent on a building that can't recruit a unit already. Note that the two are not mutually exclusive, we might well both be right. I'd like to try moving recruit peasant to the farms, then see if I can make recruit something else dependent on farms, just as an exercise in testing the hardcoded limits for posting in Red Harvest's thread on that subject. I'd also like to try making recruit militia dependent on farms, to see if my crashes were due to my theory being true or to yours.
    "Let us wrestle with the ineffable and see if we may not, in fact, eff it after all." -Dirk Gently, character of the late great Douglas Adams.

  7. #7

    Default Re: A quick question from a modding newbie...

    Sorry, brain fart, ignore my previous post. Your previous problem has already proven my theory, so we are both correct and the only remaining question is whether adding recruitment capability to a building that doesn't have it (ie peasants to farms) allows that building to be used as a prereq for other units. If not, then it's hardcoded to only allow dependencies on the buildings that can recruit in vanilla. Once that's settled, I'll feel more like I've earned my first sticky. Many thanks to Duke John for the honor and Angadil for the assist.
    "Let us wrestle with the ineffable and see if we may not, in fact, eff it after all." -Dirk Gently, character of the late great Douglas Adams.

  8. #8
    Ashes to ashes. Funk to funky. Member Angadil's Avatar
    Join Date
    May 2004
    Location
    Madrid, Spain
    Posts
    2,242

    Default Re: A quick question from a modding newbie...

    Sorry, I should have elaborated a bit more. Your theory, to the extent I've been able to test it, was perfectly sound: buildings that don't build units caused a CTD everytime I tried to make them a condition for another unit (that applies to buildings that recruited units in vanilla, but from which I had removed that capability). Conversely, buildings that build units can be made prerrequisites for units built somewhere else. And that is valid for buildings that did not even exist in vanilla. I implemented a completely new building, made it capable of recruiting peasants and worked perfectly well as a requirement for units recruited at the barracks. I would guess that it also should work with pre-existing buildings to which you add the recruiting capability.

    HOWEVER, the above simply does not seem to apply to core_buildings. Units recruited there simply won't admit any building in their requirements, regardless of whether it recruits units or not. In my experience, this is valid for both units recruited at core buildings in vanilla or units made recruitable there in a modification.

    Again, thanks, Pode. I am finally progressing in things I wanted to implement.

    A.
    Europa Barbarorum. Giving history a chance.

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