Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: The REPLACED_BY tag  (Read 1784 times)

GregHayes

  • Bay Watcher
    • View Profile
    • http://www.opengameforge.org
The REPLACED_BY tag
« on: April 29, 2010, 11:10:16 am »

So my attempts at entity modding have been stymied by some trouble with the REPLACED_BY tag. For some reason, positions with this tag have a stubborn tendency to refuse to appear. For example:

Code: [Select]
[POSITION:CHAMBERLAIN]
[NAME:chamberlain:chamberlain]
[SITE]
[NUMBER:1]
[RESPONSIBILITY:ACCOUNTING]
[RESPONSIBILITY:MANAGE_PRODUCTION]
[RESPONSIBILITY:TRADE]
[APPOINTED_BY:KNIGHT_LEADER]
[REPLACED_BY:STEWARD]
[PRECEDENCE:180]
[EXPORTED_IN_LEGENDS]
[DO_NOT_CULL]
[COLOR:5:0:0]
[DUTY_BOUND]
[REQUIRED_OFFICE:1]

Does not appear, even though

Code: [Select]
[POSITION:KNIGHT_LEADER]
[NAME:knight:knights]
[GENDER:MALE]
[SITE]
[LAND_HOLDER:1]
[LAND_NAME:a manor]
[NUMBER:1]
[SUCCESSION:BY_HEIR]
[RULES_FROM_LOCATION]
[REPLACED_BY:BARON]
[RESPONSIBILITY:LAW_MAKING]
[RESPONSIBILITY:MILITARY_GOALS]
[RESPONSIBILITY:MILITARY_STRATEGY]
[RESPONSIBILITY:RECEIVE_DIPLOMATS]
[RESPONSIBILITY:ATTACK_ENEMIES]
[RESPONSIBILITY:PATROL_TERRITORY]
[RESPONSIBILITY:LAW_ENFORCEMENT]
[RESPONSIBILITY:EXECUTIONS]
[SQUAD:10:soldier:soldiers]
[PRECEDENCE:130]
[FLASHES]
[BRAG_ON_KILL]
[CHAT_WORTHY]
[DO_NOT_CULL]
[KILL_QUEST]
[EXPORTED_IN_LEGENDS]
[ACCOUNT_EXEMPT]
[PUNISHMENT_EXEMPTION]
[COLOR:4:0:1]
[REQUIRED_CABINETS:1]
[REQUIRED_RACKS:1]
[REQUIRED_STANDS:1]
[REQUIRED_BEDROOM:100]
[REQUIRED_DINING:100]
[REQUIRED_OFFICE:100]
[DUTY_BOUND]

does.

Any chance someone could give me a hand with this?
Logged

Zangi

  • Bay Watcher
    • View Profile
Re: The REPLACED_BY tag
« Reply #1 on: April 29, 2010, 05:22:48 pm »

The problem is not with the Chamberlain or Knight Leader.... 

Whats the raw for your Steward?


To be clear, this is your custom [CIV_CONTROLLABLE] entity?
Logged
All life begins with Nu and ends with Nu...  This is the truth! This is my belief! ... At least for now...
FMA/FMA:B Recommendation

GregHayes

  • Bay Watcher
    • View Profile
    • http://www.opengameforge.org
Re: The REPLACED_BY tag
« Reply #2 on: April 29, 2010, 05:41:10 pm »

Yeah. I'm trying to add a few more playable civilizations, including feudal human kingdoms.

Code: [Select]
[POSITION:STEWARD]
[NAME:steward:steward]
[SITE]
[NUMBER:1]
[RESPONSIBILITY:MANAGE_PRODUCTION]
[RESPONSIBILITY:TRADE]
[RESPONSIBILITY:COLLECT_TAXES]
[APPOINTED_BY:DUKE]
[APPOINTED_BY:MARGRAVE]
[APPOINTED_BY:COUNT]
[APPOINTED_BY:BARON]
[PRECEDENCE:120]
[ACCOUNT_EXEMPT]
[MENIAL_WORK_EXEMPTION]
[SLEEP_PRETENSION]
[PUNISHMENT_EXEMPTION]
[EXPORTED_IN_LEGENDS]
[DO_NOT_CULL]
[COLOR:6:0:1]
[DUTY_BOUND]
[DEMAND_MAX:1]
[MANDATE_MAX:1]
[REQUIRED_BOXES:2]
[REQUIRED_CABINETS:1]
[REQUIRED_RACKS:1]
[REQUIRED_STANDS:1]
[REQUIRED_OFFICE:250]
[REQUIRED_BEDROOM:100]
[REQUIRED_DINING:100]
Logged

Zangi

  • Bay Watcher
    • View Profile
Re: The REPLACED_BY tag
« Reply #3 on: April 29, 2010, 06:23:43 pm »

The reason the Chamberlain never shows up...

[REQUIRES_POPULATION:50] (This is from the unmodded Dwarf Mayor)

Basically if you put nothing in place, default is: [REQUIRES_POPULATION:0]
So what you get is that the Steward automatically replaces the Chamberlain because you've technically already reached the minimum population before the Steward becomes available and the Chamberlain becomes obsolete.

As you are probably going to ask: "Is there another way?"
None that I know of... maybe someone more familiar can answer?

You could probably make the Steward's population requirement the same as the Baron...


EDIT:  Actually...

For the LAND_HOLDER positions below (baron etc.) this sets up the different levels your fort needs to reach to attain them.  LAND_HOLDER_TRIGGER:<land holder number>:<population>:<wealth exported>:<created wealth>
Code: [Select]
[LAND_HOLDER_TRIGGER:1:20:10000:100000]
[LAND_HOLDER_TRIGGER:2:20:20000:200000]
[LAND_HOLDER_TRIGGER:3:20:30000:300000]

Code: [Select]
[POSITION:BARON]
[NAME_MALE:baron:barons]
[NAME_FEMALE:baroness:baronesses]
[SPOUSE_MALE:baron consort:barons consort]
[SPOUSE_FEMALE:baroness consort:baronesses consort]
[SITE]
[LAND_HOLDER:1]
[LAND_NAME:a barony]

This one seems a lot more flexible...  I do not know if [LAND_NAME] is required... [LAND_HOLDER] I am sure is definitely required, but yea, looks like you can at least have more conditions to the Steward and related showing up, based on population, exports and fortress created wealth.
« Last Edit: April 29, 2010, 06:37:13 pm by Zangi »
Logged
All life begins with Nu and ends with Nu...  This is the truth! This is my belief! ... At least for now...
FMA/FMA:B Recommendation

GregHayes

  • Bay Watcher
    • View Profile
    • http://www.opengameforge.org
Re: The REPLACED_BY tag
« Reply #4 on: April 29, 2010, 08:27:12 pm »

Hm. I sort of assumed you could only have one LAND_HOLDER per site, but perhaps not. I'll look into it.
Logged

Zangi

  • Bay Watcher
    • View Profile
Re: The REPLACED_BY tag
« Reply #5 on: April 29, 2010, 08:33:04 pm »

Well, the dwarf entity LAND_HOLDERS have a REPLACED_BY tag...

Baron REPLACED_BY Count and then REPLACED_BY Duke.

The LAND_HOLDER 1-3 just indicates their ID#.  At least that seems to be the way it goes.  And you should be able to add more LAND_HOLDERS then just the 3...
Logged
All life begins with Nu and ends with Nu...  This is the truth! This is my belief! ... At least for now...
FMA/FMA:B Recommendation

GregHayes

  • Bay Watcher
    • View Profile
    • http://www.opengameforge.org
Re: The REPLACED_BY tag
« Reply #6 on: April 29, 2010, 08:40:50 pm »

Hm. Tried adding [LAND_HOLDER:2] to the steward, with no success. Although come to think of it, I also had similar problems with getting the knight to appear before (since he upgrades to a baron). I'd really rather not just make it all population-based if I can.
Logged

Zangi

  • Bay Watcher
    • View Profile
Re: The REPLACED_BY tag
« Reply #7 on: April 29, 2010, 08:45:57 pm »

For the LAND_HOLDER positions below (baron etc.) this sets up the different levels your fort needs to reach to attain them.  LAND_HOLDER_TRIGGER:<land holder number>:<population>:<wealth exported>:<created wealth>
Code: [Select]
[LAND_HOLDER_TRIGGER:1:20:10000:100000]
[LAND_HOLDER_TRIGGER:2:20:20000:200000]
[LAND_HOLDER_TRIGGER:3:20:30000:300000]

You need this too, if you havn't put it in.

This is standalone, doesn't have to be under any POSITION.
Logged
All life begins with Nu and ends with Nu...  This is the truth! This is my belief! ... At least for now...
FMA/FMA:B Recommendation

GregHayes

  • Bay Watcher
    • View Profile
    • http://www.opengameforge.org
Re: The REPLACED_BY tag
« Reply #8 on: April 29, 2010, 08:51:27 pm »

Ah, no, see, just for demonstration here, I have:

Code: [Select]
[LAND_HOLDER_TRIGGER:1:0:0:0]
[LAND_HOLDER_TRIGGER:2:20:100000:100000]
[LAND_HOLDER_TRIGGER:3:20:200000:200000]
[LAND_HOLDER_TRIGGER:4:20:300000:300000]
[LAND_HOLDER_TRIGGER:5:20:400000:400000]

And then, down at the bottom of the land-holder totem poll, these two positions, which seem to be working as designed:

Code: [Select]
[POSITION:BARON]
[NAME:baron:barons]
[GENDER:MALE]
[SPOUSE_FEMALE:baroness consort:baronesses consort]
[SITE]
[LAND_HOLDER:2]
[LAND_NAME:a barony]
[RULES_FROM_LOCATION]
[SUCCESSION:BY_POSITION:NOBLE_HEIR]
[RESPONSIBILITY:LAW_MAKING]
[RESPONSIBILITY:MILITARY_GOALS]
[RESPONSIBILITY:MILITARY_STRATEGY]
[RESPONSIBILITY:RECEIVE_DIPLOMATS]
[RESPONSIBILITY:ATTACK_ENEMIES]
[RESPONSIBILITY:PATROL_TERRITORY]
[APPOINTED_BY:MONARCH]
[REPLACED_BY:COUNT]
[COMMANDER:KNIGHT_LEADER:ALL]
[COMMANDER:KNIGHT:ALL]
[SQUAD:10:soldier:soldiers]
[RULES_FROM_LOCATION]
[PRECEDENCE:40]
[MENIAL_WORK_EXEMPTION]
[MENIAL_WORK_EXEMPTION_SPOUSE]
[SLEEP_PRETENSION]
[PUNISHMENT_EXEMPTION]
[FLASHES]
[BRAG_ON_KILL]
[CHAT_WORTHY]
[DO_NOT_CULL]
[KILL_QUEST]
[EXPORTED_IN_LEGENDS]
[COLOR:5:0:0]
[ACCOUNT_EXEMPT]
[DUTY_BOUND]
[DEMAND_MAX:2]
[MANDATE_MAX:1]
[REQUIRED_BOXES:2]
[REQUIRED_CABINETS:1]
[REQUIRED_RACKS:1]
[REQUIRED_STANDS:1]
[REQUIRED_OFFICE:500]
[REQUIRED_BEDROOM:500]
[REQUIRED_DINING:500]
[REQUIRED_TOMB:500]

Code: [Select]
[POSITION:KNIGHT_LEADER]
[NAME:knight:knights]
[GENDER:MALE]
[SITE]
[LAND_HOLDER:1]
[LAND_NAME:a manor]
[NUMBER:1]
[SUCCESSION:BY_HEIR]
[RULES_FROM_LOCATION]
[REPLACED_BY:BARON]
[RESPONSIBILITY:LAW_MAKING]
[RESPONSIBILITY:MILITARY_GOALS]
[RESPONSIBILITY:MILITARY_STRATEGY]
[RESPONSIBILITY:RECEIVE_DIPLOMATS]
[RESPONSIBILITY:ATTACK_ENEMIES]
[RESPONSIBILITY:PATROL_TERRITORY]
[RESPONSIBILITY:LAW_ENFORCEMENT]
[RESPONSIBILITY:EXECUTIONS]
[SQUAD:10:soldier:soldiers]
[PRECEDENCE:130]
[FLASHES]
[BRAG_ON_KILL]
[CHAT_WORTHY]
[DO_NOT_CULL]
[KILL_QUEST]
[EXPORTED_IN_LEGENDS]
[ACCOUNT_EXEMPT]
[PUNISHMENT_EXEMPTION]
[COLOR:4:0:1]
[REQUIRED_CABINETS:1]
[REQUIRED_RACKS:1]
[REQUIRED_STANDS:1]
[REQUIRED_BEDROOM:100]
[REQUIRED_DINING:100]
[REQUIRED_OFFICE:100]
[DUTY_BOUND]

And these two, which are not:

Code: [Select]
[POSITION:CHAMBERLAIN]
[NAME:chamberlain:chamberlain]
[SITE]
[NUMBER:1]
[RESPONSIBILITY:ACCOUNTING]
[RESPONSIBILITY:MANAGE_PRODUCTION]
[RESPONSIBILITY:TRADE]
[APPOINTED_BY:KNIGHT_LEADER]
[REPLACED_BY:STEWARD]
[PRECEDENCE:180]
[EXPORTED_IN_LEGENDS]
[DO_NOT_CULL]
[COLOR:5:0:0]
[DUTY_BOUND]
[REQUIRED_OFFICE:1]

Code: [Select]
[POSITION:STEWARD]
[NAME:steward:steward]
[SITE]
[LAND_HOLDER:2]
[NUMBER:1]
[RESPONSIBILITY:MANAGE_PRODUCTION]
[RESPONSIBILITY:TRADE]
[RESPONSIBILITY:COLLECT_TAXES]
[APPOINTED_BY:DUKE]
[APPOINTED_BY:MARGRAVE]
[APPOINTED_BY:COUNT]
[APPOINTED_BY:BARON]
[PRECEDENCE:120]
[ACCOUNT_EXEMPT]
[MENIAL_WORK_EXEMPTION]
[SLEEP_PRETENSION]
[PUNISHMENT_EXEMPTION]
[EXPORTED_IN_LEGENDS]
[DO_NOT_CULL]
[COLOR:6:0:1]
[DUTY_BOUND]
[DEMAND_MAX:1]
[MANDATE_MAX:1]
[REQUIRED_BOXES:2]
[REQUIRED_CABINETS:1]
[REQUIRED_RACKS:1]
[REQUIRED_STANDS:1]
[REQUIRED_OFFICE:250]
[REQUIRED_BEDROOM:100]
[REQUIRED_DINING:100]
Logged

Zangi

  • Bay Watcher
    • View Profile
Re: The REPLACED_BY tag
« Reply #9 on: April 29, 2010, 09:00:58 pm »

Code: [Select]
[POSITION:STEWARD]
      [NAME:steward:steward]
      [SITE]
      [LAND_HOLDER:2]
      [LAND_NAME:a barony]
      [NUMBER:1]
      [RESPONSIBILITY:MANAGE_PRODUCTION]
      [RESPONSIBILITY:TRADE]
      [RESPONSIBILITY:COLLECT_TAXES]
      [APPOINTED_BY:DUKE]
      [APPOINTED_BY:MARGRAVE]
      [APPOINTED_BY:COUNT]
      [APPOINTED_BY:BARON]
      [PRECEDENCE:120]
      [ACCOUNT_EXEMPT]
      [MENIAL_WORK_EXEMPTION]
      [SLEEP_PRETENSION]
      [PUNISHMENT_EXEMPTION]
      [EXPORTED_IN_LEGENDS]
      [DO_NOT_CULL]
      [COLOR:6:0:1]
      [DUTY_BOUND]
      [DEMAND_MAX:1]
      [MANDATE_MAX:1]
      [REQUIRED_BOXES:2]
      [REQUIRED_CABINETS:1]
      [REQUIRED_RACKS:1]
      [REQUIRED_STANDS:1]
      [REQUIRED_OFFICE:250]
      [REQUIRED_BEDROOM:100]
      [REQUIRED_DINING:100]

Alternatively...

Code: [Select]
   [LAND_HOLDER_TRIGGER:3:20:100001:100001]
And [LAND_HOLDER:3]
Looks like LAND_NAME is a requirement?  Just don't make it different from the equivalent level.


Does the Error report ding up anything?
Logged
All life begins with Nu and ends with Nu...  This is the truth! This is my belief! ... At least for now...
FMA/FMA:B Recommendation

GregHayes

  • Bay Watcher
    • View Profile
    • http://www.opengameforge.org
Re: The REPLACED_BY tag
« Reply #10 on: April 29, 2010, 09:10:55 pm »

No, I tried removing [LAND_NAME] from the baron and the knight showed up just fine. Error log is empty.
Logged

GregHayes

  • Bay Watcher
    • View Profile
    • http://www.opengameforge.org
Re: The REPLACED_BY tag
« Reply #11 on: April 30, 2010, 09:09:23 am »

So I've continued my investigation, and all I've learned is that it either must have something to do with the order of the tags or just be completely random, because I can't find the tag responsible.
Logged

Knight Otu

  • Bay Watcher
  • ☺4[
    • View Profile
Re: The REPLACED_BY tag
« Reply #12 on: April 30, 2010, 09:39:22 am »

As far as I'm reading it, the chamberlain is only appointed by the knight. Try to add the knight's successors as possible appointers, and possibly allow the steward to be appointed by the knight as well (much like the captain of the guard can be appointed by the expedition leader and the mayor, even though you should only have a mayor at that point).
Logged
Direforged Original
Random Raw Scripts - Randomly generated Beasts , Vermin, Hags, Vampires, and Civilizations
Castle Otu

GregHayes

  • Bay Watcher
    • View Profile
    • http://www.opengameforge.org
Re: The REPLACED_BY tag
« Reply #13 on: April 30, 2010, 10:01:22 am »

No, the problem was diagnosed correctly at first - for some reason, the game considers the steward to be a potential position on start-up, and therefore replaces the chamberlain with it. Making it so the knight can appoint the steward only means I can appoint a steward at game start, rather than when the baron arrives. Now, I know that it's possible to give a position requirements other than population, since the nobles use them. I'm just not sure how. I know it's not LAND_HOLDER, as everything works just fine without that in the baron.
« Last Edit: April 30, 2010, 10:07:15 am by GregHayes »
Logged

derigo

  • Bay Watcher
    • View Profile
Re: The REPLACED_BY tag
« Reply #14 on: April 30, 2010, 10:18:23 am »

Keep in mind, there's a 'landholder nobles never show up at some forts' bug in the current version with unknown causes. 
Logged
Pages: [1] 2