Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
I was hoping someone more versed in this area might be able to shed some light: are there complications to using spawn_agent from within a mission_template to add other agents to a scene (say in a town) DURING the mission, rather than setting them as visitors through the game menu PRIOR to the mission beginning?

Heroes injured in-scene, are injured in party after the scene ends, which was one oversight I was worried about. I've not tested with non-hero troops though. Are there reasons I should use the visitor commands instead?
 
A combination of the two, add_visitors_to_current_scene doesn't seem to work too well inside battles - at least when they're randomly generated (the entry points that is). Non-hero spawned troops just get added to casualties like any other troop. Some variables may not be set for spawned agents, like the values for agent_get_party_id or agent_get_entry_no, but I don't really know of any other complications.
 
A quick question:

Any idea why, on a certain scene that I am trying to create, whenever I raise part of the terrain (to a sensible height, nothing extreme), Warband decides to completely remove the map-border along one edge? The players are then allowed to run to the very edge of the scene where they 'glitch' back & forth... the other three scene edges work perfectly fine.  :neutral:
 
Turanien said:
Any idea why, on a certain scene that I am trying to create, whenever I raise part of the terrain (to a sensible height, nothing extreme), Warband decides to completely remove the map-border along one edge?
Are you 100% sure that terrain code in module_scenes was initially for this very sco file? In other words, does the bug persists if you remove related sco file, let game generate sco anew and then edit it?
 
GetAssista said:
Turanien said:
Any idea why, on a certain scene that I am trying to create, whenever I raise part of the terrain (to a sensible height, nothing extreme), Warband decides to completely remove the map-border along one edge?
Are you 100% sure that terrain code in module_scenes was initially for this very sco file? In other words, does the bug persists if you remove related sco file, let game generate sco anew and then edit it?

Mhm. I'll double-check...

I've deleted the scene in strings, scene and scripts and re-added it as a brand new map - fresh scene. However, again, when editing the terrain height, saving, reloading - the map has lost one of its edges again! Damn...  :neutral:

I have made many maps before for MP so I do not believe that I am doing anything wrong. Could this be a new bug perhaps introduced in the latest patch? I have not made a map for a couple of patches...
 
Is there a way to copy the compiled text files to another map when compiling your mod? Like add a second export directory. Maybe something like this;

Code:
# Point export_dir to the folder you will be keeping your module
# Make sure you use forward slashes (/) and NOT backward slashes (\)

export_dir = "MODFOLDER"
export_dir2 = "OTHER_FOLDER"

EDIT: Fixed it, its working now :wink:.
 
How do I store and alter decimal numbers in the module system? For creating bullet drop, I try to store and compute decimal numbers, but the game keeps rounding everything off to a useless integer. I have tried using both the fixed_point_multiplier and without using it.
 
ithilienranger said:
How do I store and alter decimal numbers in the module system? For creating bullet drop, I try to store and compute decimal numbers, but the game keeps rounding everything off to a useless integer. I have tried using both the fixed_point_multiplier and without using it.

When it comes down to it, everything will always be an integer to the engine after you use whatever arithmetic functions. The only way to get partially around it is to use the fix point multiplier directly or indirectly and work in numbers a few powers of 10 larger than what you actually want to deal in. E.g. multiplying all numbers by 1000 and then doing any number of operations on those numbers and finally dividing the result by 1000 to get it back to the correct scale...in integer form. You could always use the mod function to get the remainder of the division, but there isn't a way to deal in decimals directly. Make sure you are dealing in the smallest unit (cm, rather than meters, for instance) to help approximate these decimals.
 
I have a little out-topic question:

how do I add those "+1 to loot when equiped" or those "+1 to tracking while in inventory"?
I know that for the "while in inventory", you have to make it as a book, but after that I'm dead. xD
 
script_game_get_skill_modifier_for_troop. Add your item in for any of the skills - it doesn't have to be a book. You can set the conditions to parse through the first 4 ek_item_# slots instead of the whole inventory like it does for books.
 
Alright. Heres the thing. I have been trying to implent the Elephant from Hegemony into Warband, and I have, seemingly, succeeded. But theres one problem. It all looks good in OpenBRF, but when in battle, my men are just floating in the air. I gave the elephant to my men using Morghs tools, made the Elephant bigger that way aswell. But it still is invicible. It seems to be working otherwise.

problemoc.jpg

Heres the pics of OpenBRF.
 
I do use a static mesh, as the matter of fact. But how do I turn my static mesh into an rigged one? I have the original rigged one, but it has an rider modelled into it, which I manually removed already for the static mesh.
 
Import that rigged one in open brf and select edit/copy and than edit/paste rigging on that static mesh. That should work.
 
Status
Not open for further replies.
Back
Top Bottom