Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.

Lumos

Archduke
WBWF&SNWM&BVC
What could I have screwed up in order to have my player troop start the game with an empty inventory, after I've got some items on his troop definition and a few more depending on the starting choices?

EDIT: Excuse the double post, had completely forgotten.
 

Mad Vader

Duhpressed
Duke
M&BWB
Do you use trp_player or do disturbing things with set_player_troop?
Do you have a sneaky troop_clear_inventory somewhere?
 

Lumos

Archduke
WBWF&SNWM&BVC
MadVader said:
Do you use trp_player or do disturbing things with set_player_troop?
Do you have a sneaky troop_clear_inventory somewhere?
Honestly, I have no idea. However, adding things to my customised raise-skills-after-starting-choices script works good, so I'll add starting items to it from now on.
 

Cozur

Grandmaster Knight
WB
Is there any way to set a lords loyalty from the start? So have Lord 1 be super loyal, and lord 2 be very likely to defect?

Also, got this problem:





Think it's related to this trigger:

#INVADER SPAWNS
#BROTHERHOOD WITHOUT BANNERS
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_castle_29", "pt_brotherhood"),
    (try_end),
  ]),
#INVADER SPAWNS
#BRAVE COMPANIONS
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_castle_29", "pt_brave_companions"),
    (try_end),
  ]),
#INVADER SPAWNS
#KHAL MORO
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_town_12", "pt_moro"),
    (try_end),
  ]),
#INVADER SPAWNS
#KHAL PONO
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_town_12", "pt_pono"),
    (try_end),
  ]),
#INVADER SPAWNS
#SONS OF THE MIST
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_castle_106", "pt_gorg"),
    (try_end),
  ]),
#INVADER SPAWNS
#WILDLING INVADERS
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_town_9", "pt_rodmar"),
    (try_end),
  ]),
#INVADER SPAWNS
#WILDLING FUGITIVES
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_town_9", "pt_vergund"),
    (try_end),
  ]),
#INVADER SPAWNS
#HOUSE CODD
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_town_40", "pt_house_codd"),
    (try_end),
  ]),
#INVADER SPAWNS
#STEPSTONE PIRATES
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_town_44", "pt_stepstone_pirates"),
    (try_end),
  ]),
#INVADER SPAWNS
#RAMSAY SNOW
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_castle_32", "pt_ramsay"),
    (try_end),
  ]),
#INVADER SPAWNS
#AEGON FREY
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_castle_7", "pt_aegonfrey"),
    (try_end),
  ]),
#INVADER SPAWNS
#RORGE
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_castle_7", "pt_rorge"),
    (try_end),
  ]),
#INVADER SPAWNS
#STONE CROWS
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_castle_7", "pt_stone_crows"),
    (try_end),
  ]),
#INVADER SPAWNS
#BURNED MEN
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_castle_7", "pt_burned_men"),
    (try_end),
  ]),
#INVADER SPAWNS
#BLACK EARS
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_castle_7", "pt_black_ears"),
    (try_end),
  ]),
#INVADER SPAWNS
#MOON BROTHERS
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_castle_7", "pt_moon_brothers"),
    (try_end),
  ]),
#INVADER SPAWNS
#HORMAN
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_castle_7", "pt_horman"),
    (try_end),
  ]),
#INVADER SPAWNS
#SKAGOS
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_castle_7", "pt_skagos"),
    (try_end),
  ]),
#INVADER SPAWNS
#IBEEN RAIDERS
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_castle_7", "pt_ibbenraider"),
    (try_end),
  ]),

]


# modmerger_start version=201 type=2
try:
    component_name = "triggers"
    var_set = { "triggers" : triggers }
    from modmerger import modmerge
    modmerge(var_set)
except:
    raise
# modmerger_end
 

Hypno Toad

Sergeant at Arms
How would I go about making "custom" battle scenes.

I'd like to hand craft various battles scenes for each terrain type, rather than have them be randomly generated. though I can't figure out how I'd go about having those scenes come up.
 
You want the script "setup_random_scene" which decides which map to use depending on the terrain you're standing on.

You'd want to change:
Code:
(eq, ":terrain_type", rt_plain),
(assign, ":scene_to_use", "scn_random_scene_plain"),

to something like:
Code:
(eq, ":terrain_type", rt_plain),
(store_random_in_range,":random",1,3),
   (try_begin),
   (eq, ":random", 1),
   (assign, ":scene_to_use", "scn_plains_battle1"),
   (else_try),
   (eq, ":random", 2),
   (assign, ":scene_to_use", "scn_plains_battle2"),
   (try_end),

That's at least how I do it.
 

Hypno Toad

Sergeant at Arms
Thanks, I'll give it a shot


Edit:

Eh, another fairly rudimentary question here, I'm rather new to scene editing so I'm not totally aware how to organize terrain codes and .sco files.

I've got a tonne of towns, and I wanted to skip ahead to town_74 and make a practice town scene. I've generated a terrain code to use as a basis for the town, but I'm having trouble getting this base terrain scene to show up. I've added  the "town_74_center" entry to to module_scenes with the terrain code, but when I go to the town center it just takes me to a locked room in a tavern.
 
Anyone know whether adding items is similar to adding faces through .txts. Meaning you'd add the textures/ resource files and edit the itemkinds.txt to have those items. I'm pretty sure it is.

Edit: The items are showing ingame but they are pure white and they also don't show inside of cheatmenu find item option.

http://forums.taleworlds.com/index.php/topic,100949.msg2526671.html#msg2526671 I did what he did there in the warband section (the main post) I've also successfully (albeit half was white the first try) added skin meshes before.

mb4px.jpg

mb5m.jpg

That is also a hair style I added, I really don't understand why these textures aren't loading.

94447804.png

74079968.png

86747365.png

79194829.png

I even tried adding all of the textures from the other map to see if that would make it show the textures but it didn't work. Any help would be very appreciated as I'd like to add these cool items to my game for personal use. To add them to the game I'm using morghs editor and also using a new game.

Also added the correct textures for the armors since then and they still turn up white, so for some reason the textures aren't loading can anyone tell me why?
 

Cozur

Grandmaster Knight
WB
Cozur said:
Is there any way to set a lords loyalty from the start? So have Lord 1 be super loyal, and lord 2 be very likely to defect?

Also, got this problem:





Think it's related to this trigger:

#INVADER SPAWNS
#BROTHERHOOD WITHOUT BANNERS
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_castle_29", "pt_brotherhood"),
    (try_end),
  ]),
#INVADER SPAWNS
#BRAVE COMPANIONS
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_castle_29", "pt_brave_companions"),
    (try_end),
  ]),
#INVADER SPAWNS
#KHAL MORO
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_town_12", "pt_moro"),
    (try_end),
  ]),
#INVADER SPAWNS
#KHAL PONO
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_town_12", "pt_pono"),
    (try_end),
  ]),
#INVADER SPAWNS
#SONS OF THE MIST
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_castle_106", "pt_gorg"),
    (try_end),
  ]),
#INVADER SPAWNS
#WILDLING INVADERS
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_town_9", "pt_rodmar"),
    (try_end),
  ]),
#INVADER SPAWNS
#WILDLING FUGITIVES
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_town_9", "pt_vergund"),
    (try_end),
  ]),
#INVADER SPAWNS
#HOUSE CODD
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_town_40", "pt_house_codd"),
    (try_end),
  ]),
#INVADER SPAWNS
#STEPSTONE PIRATES
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_town_44", "pt_stepstone_pirates"),
    (try_end),
  ]),
#INVADER SPAWNS
#RAMSAY SNOW
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_castle_32", "pt_ramsay"),
    (try_end),
  ]),
#INVADER SPAWNS
#AEGON FREY
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_castle_7", "pt_aegonfrey"),
    (try_end),
  ]),
#INVADER SPAWNS
#RORGE
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_castle_7", "pt_rorge"),
    (try_end),
  ]),
#INVADER SPAWNS
#STONE CROWS
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_castle_7", "pt_stone_crows"),
    (try_end),
  ]),
#INVADER SPAWNS
#BURNED MEN
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_castle_7", "pt_burned_men"),
    (try_end),
  ]),
#INVADER SPAWNS
#BLACK EARS
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_castle_7", "pt_black_ears"),
    (try_end),
  ]),
#INVADER SPAWNS
#MOON BROTHERS
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_castle_7", "pt_moon_brothers"),
    (try_end),
  ]),
#INVADER SPAWNS
#HORMAN
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_castle_7", "pt_horman"),
    (try_end),
  ]),
#INVADER SPAWNS
#SKAGOS
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_castle_7", "pt_skagos"),
    (try_end),
  ]),
#INVADER SPAWNS
#IBEEN RAIDERS
(2,0,ti_once,[],[
    (set_spawn_radius, 4),
          (spawn_around_party, "p_castle_7", "pt_ibbenraider"),
    (try_end),
  ]),

]


# modmerger_start version=201 type=2
try:
    component_name = "triggers"
    var_set = { "triggers" : triggers }
    from modmerger import modmerge
    modmerge(var_set)
except:
    raise
# modmerger_end
 

shokkueibu

Knight
M&BWB
Neither [font=consolas,courier]set_spawn_radius[/font] or [font=consolas,courier]spawn_around_party[/font] can fail so using a try block on those, in this situation, would be pointless. You don't need the [font=consolas,courier]try_end[/font] operations and should remove them.

The correct way to use it is when closing a "try block" which is opened by one of the following:

[font=consolas,courier]try_begin, try_for_range, try_for_range_backwards, try_for_parties and try_for_agents[/font]
And in WSE: [font=consolas,courier]try_for_attached_parties, try_for_active_players, try_for_prop_instances and try_for_dict_keys[/font]

Check this out: An Introduction to Module System Syntax and Usage, specially the "If-Then-Else" section.

Edit: Clarified post.
 

Hypno Toad

Sergeant at Arms
Need some help from one of you module system gurus here.

I'd like to Increase the base health value (IE the health value you'd have with 0 str and 0 ironflesh) and if possible, change how much health is added by each point of strength and ironflesh.

 

thick1988

Master Knight
WBWF&SNW
I see that F10 pauses a scene and keeps characters/players from moving about. However as soon as you hit another key it unpauses. Is it possible to free move while in Edit mode with the game paused?
 
thick1988 said:
I see that F10 pauses a scene and keeps characters/players from moving about. However as soon as you hit another key it unpauses. Is it possible to free move while in Edit mode with the game paused?
Ctrl+F11 will do that.
 

Somebody

Code Pope
Baron
WBWF&S
Hypno Toad said:
I'd like to Increase the base health value (IE the health value you'd have with 0 str and 0 ironflesh) and if possible, change how much health is added by each point of strength and ironflesh.
You need to script extra hp for every agent by initializing an agent slot and then deducting damage from ti_on_agent_hit triggers from those slots instead of the agent's actual hp before inflicting damage.
thick1988 said:
I see that F10 pauses a scene and keeps characters/players from moving about. However as soon as you hit another key it unpauses. Is it possible to free move while in Edit mode with the game paused?
Also try using the scene editor thing instead which has a blank mission template so no other agents move around?
 
Hey, I need help with adding items to cheatmenus find item storage, I have the items working and can easily add them to a chest or a shop but they don't show up in the find item cheat with cheatmenu. Is there a way to add them into the game with txts?
 

Lumos

Archduke
WBWF&SNWM&BVC
AnddyiRaynor said:
Hey, I need help with adding items to cheatmenus find item storage, I have the items working and can easily add them to a chest or a shop but they don't show up in the find item cheat with cheatmenu. Is there a way to add them into the game with txts?
If chests and shops work, then why'd you want to have it working in cheats?
I, for one, have disabled the "find item" cheat menu in my own mod. :razz:

Otherwise, I haven't really looked into how it works, so I can't tell you if you could fix it easily, but I'd guess not through using the .txt files. There was a discussion (or a few) about this a month or two back, but I can't really remember what the people's results were, sorry.
 

Mad Vader

Duhpressed
Duke
M&BWB
Cheaters and tweakers, they never give up. :smile:
The problem is with the hardcoded items_end, which you can't change without the module system or if you really know what are you doing in menus.txt (hint: increase two identical numbers in mnu_cheat_find_item).
If you add items at the end of the items file, they won't be in the range of the find item cheat.
 
Status
Not open for further replies.
Top Bottom