Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Found it! Thanks for the help, I had mistakenly closed with a ] where I shouldn't, didn't notice that there were more fields on the next line...
Fixed it and made everything one-item one-line system >.<

PS: Still no idea how I noticed in the midst of 940 lines...
 
ithilienranger said:
Is there a way to have a different item mesh for each item_modifier(cracked, bent, etc.)?
["saddle_horse","Saddle Horse", [("saddle_horse",0),("horse_c",imodbits_horse_good)], itp_merchandise|itp_type_horse, 0, 240,abundance(90)|hit_points(100)|body_armor(:cool:|difficulty(1)|horse_speed(45)|horse_maneuver(44)|horse_charge(10)|horse_scale(104),imodbits_horse_basic],
 
cwr said:
Lumos said:
cwr said:
And this is the error that I'm getting:
Code:
Exporting scripts...
Error: Unrecognized tag:kingdomin object:kingdom_6_lord
ERROR: Illegal Identifier:kingdom_6_lord
Error: Unrecognized tag:hakim in object:hakim_party_template
ERROR: Illegal Identifier:hakim_party_template
I didn't even read your code, but the error is obvious: Error: Unrecognized tag:hakim. Party templates are ferenced with the pt_ identifier. pt_hakim_party_template.

Ahh, thanks! :grin: I will try that.


The reason for my current code is because I was trying to copy the code referencing the other party templates; so anyway, thank you. :grin:

Got this ^^ going without compile errors, but ingame, the certain lord still does not have the unique troop.
Part Template:
Code:
("sanjar_party_template","{!}sanjar_party_template",icon_gray_knight|pf_show_faction,0,fac_commoners,soldier_personality,[(trp_kingdom_3_lord,1,1),(trp_drahara_elephant_rider,5,10)]),

Short code in scripts where we changed things:
Code:
(try_begin),
        (this_or_next|eq, ":party_type", spt_town),
        (eq, ":party_type", spt_castle),  #CASTLE OR TOWN
        (try_begin),
          (lt, ":rand", 65),
          (assign, ":party_template", ":party_template_a"),
        (else_try),
          (assign, ":party_template", ":party_template_b"),
        (try_end),
        (else_try),
        (eq, "trp_kingdom_3_lord"), # Look here... # 
        (assign,    ":party_template", "pt_sanjar_party_template"),
        (else_try),
        (eq, ":party_type", spt_kingdom_hero_party),
        (try_begin),
          (lt, ":rand", 50),
          (assign, ":party_template", ":party_template_a"),
        (else_try),
          (lt, ":rand", 75),
          (assign, ":party_template", ":party_template_b"),
        (else_try),
          (assign, ":party_template", ":party_template_c"),
        (try_end),
        (else_try),
 
Any ideas what to do next?
 
MadVader said:
ithilienranger said:
Is there a way to have a different item mesh for each item_modifier(cracked, bent, etc.)?
["saddle_horse","Saddle Horse", [("saddle_horse",0),("horse_c",imodbits_horse_good)], itp_merchandise|itp_type_horse, 0, 240,abundance(90)|hit_points(100)|body_armor(:cool:|difficulty(1)|horse_speed(45)|horse_maneuver(44)|horse_charge(10)|horse_scale(104),imodbits_horse_basic],
Thanks, I hope to use this to make a system for weapon modifications.
 
It's usually more worthwhile to create separate items, each with its own mesh.
There's no reason I can think of to use the hardcoded modifiers except for the built-in loot/merchandise randomization.
 
Michadr said:
Code:
(eq, "trp_kingdom_3_lord"), # Look here... #
Any ideas what to do next?
You're checking a static reference against nothing at all. The game doesn't automatically fetch a valid-sounding variable for you.
ithilienranger said:
I want to avoid making tons of item tuples for every combination of modifications.
I also use this system - it's a fairly simple way to do "factionalized" items without creating a bunch of variants, especially if you re-purpose some unused item modifiers that have no effect on item stats (superb, powerful, deadly, sharp, and categories that don't apply like "masterwork plate armor" or "hardened stick"). It's also useful where you've just updated graphical resources and the new ones can be marked as the 0 mesh while the outdated ones can be marked by imodbits_bad.

The downside is you can't use them as equipment overrides or re-equip agents with them or display them on item mesh overlays. There is also a way to modify the compilation of module_troops so that these item modifiers show up when the game loads - it involves the 0 digit following the item ID, and you need to bitshift the appropriate imod.
 
Is there any way to get itcf_thrust_musket to work while mounted or to get itcf_overswing_spear to work with a shield?  As far as I can tell, thrust musket doesn't work on horseback, and overswing spear doesn't work with a shield.
 
Somebody said:
You're checking a static reference against nothing at all. The game doesn't automatically fetch a valid-sounding variable for you.

We've tried these:
Code:
(eq, ":spawned_party","pt_kingdom_3_lord"),
# and
(eq, ":spawned_party","trp_kingdom_3_lord"),
# and
(eq, ":spawned_party","p_kingdom_3_lord"),
# and
(eq, ":spawned_party","kingdom_3_lord"),
# and
(eq, "trp_kingdom_3_lord"),
# and
(eq, "pt_kingdom_3_lord"),
# and
(eq, "kingdom_3_lord"),

What else could we use?
 
grailknighthero said:
Is there any way to get itcf_thrust_musket to work while mounted or to get itcf_overswing_spear to work with a shield?  As far as I can tell, thrust musket doesn't work on horseback, and overswing spear doesn't work with a shield.
I hardly play with animations, but you can try using the last unused animation slot set, thrust_musket (enabled by itcf_thrust_musket). Try copying some flags from thrust_onehanded_lance, or even replacing it altogether and making spears also share thrust_onehanded_horseback used by swords.
cwr said:
We've tried these:
  • :spawned_party doesn't even exist in the context of cf_reinforce_party, when the party ID is under the first parameter :party_no
  • Parties that are created after the game is loaded are dynamic, in that you don't reference them with p_whatever unlike static parties such as towns, the exception being p_main_party.
  • Don't mix up the party/party template/troop prefixs, especially when Native has naming practices you should be following
  • Look at the script parameters (Native scripts usually have some verbose descriptions at the top for the input/output) and any lhs operations top-down - the troop whose party is being reinforced is assigned by (party_stack_get_troop_id, ":leader", ":party_no"), to the variable :leader, which is what you should be checking against your static references of trp_kingdom_3_lord
 
Somebody said:
  • :spawned_party doesn't even exist in the context of cf_reinforce_party, when the party ID is under the first parameter :party_no
  • Parties that are created after the game is loaded are dynamic, in that you don't reference them with p_whatever unlike static parties such as towns, the exception being p_main_party.
  • Don't mix up the party/party template/troop prefixs, especially when Native has naming practices you should be following
  • Look at the script parameters (Native scripts usually have some verbose descriptions at the top for the input/output) and any lhs operations top-down - the troop whose party is being reinforced is assigned by (party_stack_get_troop_id, ":leader", ":party_no"), to the variable :leader, which is what you should be checking against your static references of trp_kingdom_3_lord

Sooo... Would this work?
Code:
(party_stack_get_troop_id, ":leader", ":party_no"),
(eq, ":leader", "trp_kingdom_3_lord"),


Thanks for the help! :grin:
 
Since this is kind of pointless as you are not really trying to figure it out, here's exactly what you need to do.

At the end of script_cf_reinforce_party find this:
      (try_begin),
        (gt, ":party_template", 0),
        (party_add_template, ":party_no", ":party_template"),
      (try_end),
And insert some lines:
      (try_begin),
        (gt, ":party_template", 0),
        (party_add_template, ":party_no", ":party_template"),
        (try_begin),
          (eq, ":party_type", spt_kingdom_hero_party),
          (party_stack_get_troop_id, ":leader", ":party_no"),
          (eq, ":leader", "trp_kingdom_3_lord"),
          (party_add_members, ":party_no", "trp_asshole", 2), #change number and troop
        (try_end),
      (try_end),

This will simply add 2 assholes every time that lord receives his normal reinforcements. Simple and no new party templates are needed.
 
Does anyone know how to replace all ocean tiles with the "bridge" terrain type?
Or do I really have to edit them manually with Thorgrim's Map Editor?

I heard about editing map.txt, but I do not know what numbers stand for ocean.
 
You are thinking of "ford" terrain type, bridges are just map icons placed over ford terrain to look plausible.
You can increase the brush size in Thorgrim's, that would speed up any major terrain repainting.
 
MadVader said:
Since this is kind of pointless as you are not really trying to figure it out, here's exactly what you need to do.

At the end of script_cf_reinforce_party find this:
      (try_begin),
        (gt, ":party_template", 0),
        (party_add_template, ":party_no", ":party_template"),
      (try_end),
And insert some lines:
      (try_begin),
        (gt, ":party_template", 0),
        (party_add_template, ":party_no", ":party_template"),
        (try_begin),
          (eq, ":party_type", spt_kingdom_hero_party),
          (party_stack_get_troop_id, ":leader", ":party_no"),
          (eq, ":leader", "trp_kingdom_3_lord"),
          (party_add_members, ":party_no", "trp_asshole", 2), #change number and troop
        (try_end),
      (try_end),
Thanks! :grin:

I actually tried to figure it out, but I am pretty bad at that. :oops: We had about 2 pages of PMs trying to get it to work before asking, and now we have 3, so yes we tried.


I understand it now, though. :smile:
 
Status
Not open for further replies.
Back
Top Bottom