Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
SupaNinjaMan said:
I swear I was competent at this once, but I need help. I've never used mission_ templates before, and you'll probably laugh at what I need help with, but. . .
I'm trying to make it display the string "Hello, World!" when the player presses 'J' in any scene. Here's my code, and my stupidity, render aid.
Code:
hello_world = [
    (0, 0, 0, [(key_is_down, key_j),
                #I'm using the condition block to launch the results directly without delay, works good enough.
                (display_message,"@This is a quick string. 0_o"),
                (display_message,"str_this_is_a_string_reference_which_can_be_reused")],
    [],
    ),
]
This should do the trick. I still have problems with the syntax after all these years. But the template itself is right.
I tend to do the plugs of various triggers like this:
Code:
[(invoke_leet_haxorness)]+urmom+hello_world
 
A little question:

I've been messing around with mod tools a lot and finally got something done. However i dont like the native "intro"
How would i make a custom intro for my mod. Like u just choose gender and create the face u like and then u find urself in a similar situation like u find in with fire and sword tutorial. From a little skirmish

I got no idea where to start from, but im sure that if someone tells me where to start i can manage to do it.... :smile:
 
Ildradil said:
A little question:

I've been messing around with mod tools a lot and finally got something done. However i dont like the native "intro"
How would i make a custom intro for my mod. Like u just choose gender and create the face u like and then u find urself in a similar situation like u find in with fire and sword tutorial. From a little skirmish

I got no idea where to start from, but im sure that if someone tells me where to start i can manage to do it.... :smile:

A long answer:
First you need module system of course. No problem? Here we go;

Check the module_game_menus.py Scroll down, you'll see the first menu which called "start_game_0" and says Welcome adventurer.
Scroll down. You'll see the condition blocks of that menu which are "continue" and "go back".
You'll see the operations for those conditions. "change_screen_quit" for "Go_back", and (jump_to_menu, "mnu_start_game_1") for "continue".
"start_game_1" here, is our second window of the game starting menus. If you'll search for "start_game_1", you'll find that menu. In it's condition blocks, you'll find (jump_to_menu,"mnu_start_character_1"). Search for "start_character_1" and so on. At the end, not actual end, you'll find the menu "choose_skill", a real big one.
You can add extra operations, delete some operations or delete an entire menu with caution of course. You can add an operation which jumps directly to the menu "choose_skill" from the first menu "start_game_0". You can do lots of things here.

Go back the top of module_game_menus. Scroll down again, this time skip  "start_game_0". The second menu is "start_phase_2" . In it's conditions, you'll find the operation which jumps to "mnu_start_phase_2_5" Search for "start_phase_2_5"   (Those are where you choose a town to spawn, kill a bandit and meet the merchant in Warband.) After et cetera, find "start_phase_4" which has lots of operations including 
(set_jump_mission, "mt_meeting_merchant"),
(jump_to_scene, ":town_room_scene"), 
 
Either you can change it to the menu you want to hop out (i guess it can't be done smoothly just with typing another screen name there. You should manage the talkers and walkers etc correctly.)
or you can find the "meeting_merchant" mission in the module_mission_templates.py with the abilities of putting your party on the map with "ti_tab_pressed". which might be considered as the end of the beginning.

EDIT:
You are welcome.
 
Hi guys, I'm looking for a tutorial or some file explaining the module_postfx.py and where to find the day/night cycle script. I couldn't find it in module_scripts nor module_triggers nor module_simple_triggers. And searching the forum yielded no results.

Basically I'm trying to add a random "red night". Meaning that have to:

1. make a new entry in module_postfx and id_postfx;
2. find out exactly what should I change in my
Code:
("night_red", 0, 0, [128.0000, 1.0, 1.2549, 10.0000], [0.6471, 4.7843, 1.2157, 0.0000], [0.9804, 0.9804, 1.5294, 1.0000]),
in order to change the light color. I read in module_postfx what each of those are, but I still have no idea what they mean
3. find the day/night cycle script and add a new "if" clause with a randomizer function in order to get a random red night every now and then.
in C++ it should look like this.

[...]
night++;
if(random(1;30)==night) red_night();
                                    else normal_night();
if(night==30) night=0;
[...]

So, if any of you knows any tutorials on shaders and/or now to find the day/night cycle function, thanks in advance.
 
3. You could add otherwise identical red night skyboxes with sf_day, sf_night, sf_dawn to Skyboxes.py (following the instructions there), and a variable to use in night-related scripts and triggers. That way it/they can appear at any time without things like "the honest folk still staying on the streets".
 
Hi
Just wondering if anyone knew how to make a certain agent within a scene jump forward a few paces.
By jump I mean physically jump (not teleport or respawn).
I have code that makes the agent run to a specific entry point from their spawn point, but i need him to jump a gap and then continue running.
Thanks for any help

DarkAngel#1
 
Dawiduh said:
3. find the day/night cycle script and add a new "if" clause with a randomizer function in order to get a random red night every now and then.
Since the skybox and postfx selection is fairly hard coded into the engine (based on scene_set_day_time and set_global_cloud_amount), you might want to bypass it and make your own system, using the set_postfx or set_skybox operations from inside the ti_before_mission_start trigger of your mission template.
 
Dusk Voyager said:
3. You could add red night skyboxes with sf_day, sf_night, sf_dawn to Skyboxes.py (following the instructions there), and a variable to use in night-related scripts and triggers. That way it/they can appear at any time without things like "the honest folk still staying on the streets".

Not sure if Warband vanilla has a skyboxes.py. Is it a kit or a mod you're talking about?

Vornne said:
Dawiduh said:
3. find the day/night cycle script and add a new "if" clause with a randomizer function in order to get a random red night every now and then.
Since the skybox and postfx selection is fairly hard coded into the engine (based on scene_set_day_time and set_global_cloud_amount), you might want to bypass it and make your own system, using the set_postfx or set_skybox operations from inside the ti_before_mission_start trigger of your mission template.

Thanks, I'll look into that.

Still, nobody knows what should I modify in the night post_fx definition in order to change the light color? I played a bit with it and i can only get more or less light... and even the night with its blue-ish hue is just lack of light and not a blue light with less brightness (as I expected).
 
Dawiduh said:
Still, nobody knows what should I modify in the night post_fx definition in order to change the light color? I played a bit with it and i can only get more or less light... and even the night with its blue-ish hue is just lack of light and not a blue light with less brightness (as I expected).
I don't know much about how the postfx entries work, but you might want to try play around with some other operations listed nearby: set_startup_sun_light, set_startup_ambient_light, set_startup_ground_ambient_light; note they use the fixed point multiplier.
Dusk Voyager said:
@ Vornne: I'd thought of that, but figured it wouldn't show up on the map. Or does it?
If you mean the single player world map: I have no idea. Since I basically just work on multi player mods, I was only thinking of changing appearance in a mission (3D character mode).
 
dunde said:
Hand's models have vertex animations, but I never see they're used. Is there anybody know how to use them? Or are they're supposed to be used in unfinished feature of warband?
I believe old gauntlets (in item_meshes1.brf) have 3 frames, and the first one is used to display it in shops, the second is unused, and the third will actually be displayed on the agent. No real use for them unless you want them to look differently in the inventory, in which case you can just use another mesh with ixmesh_inventory instead.
 
Question for the mathematically-inclined:  is there a way to get the world angle coordinates from a ray going through the mouse's screen position and convert it to the sun coords? 

I've found that the biggest issue with implementing custom skies is not making the art; it's all of the fussing about with the coordinates getting the sun light angle to match the visual position of the sun in the sky.  Very, very time-consuming task for such a little thing; takes me about an hour every time I want to build a new sky, mainly re-compiling the code after making changes to get it locked down.

Haven't had time to look into this, but if there was a way to get that vector, we could just put into a trigger and voila, just make some art, drop the script into your editor code and click on a point in the sky to get the coords you need to write to skyboxes.py and put in your new skies.  Could really help a lot of projects out; skyboxes are one of the things that can dramatically alter a scene's look.
 
Two small questions: is is possible to change/remove the mesh used by a thrown object once it is released? Also, is it possible to move where the object is thrown from at the same moment, eg. a metre above the agent's head?
 
Ok, I have a small problem and I hope someone could help me.
I added 3 swords to my mod, but they do not appear to work in game, They are Invisible.
In open brf they are fine though.
sword2_zps821070bd.png

sword1_zps5a568f7b.png

sword3_zps1426a3dc.png

also I do not see anything wrong with my code,
Code:
["mak_sword1", "Kopis", [("sword_kopis",0)], itp_type_one_handed_wpn|itp_primary, itc_scimitar|itcf_carry_sword_left_hip,105 , weight(2.5)|difficulty(8)|spd_rtng(96) | weapon_length(73)|swing_damage(30 , cut) | thrust_damage(0 ,  pierce),imodbits_sword ],
["mak_sword2", "Machaira", [("sword_machaira",0)], itp_type_one_handed_wpn|itp_primary, itc_scimitar|itcf_carry_sword_left_hip,105 , weight(2.5)|difficulty(8)|spd_rtng(96) | weapon_length(73)|swing_damage(30 , cut) | thrust_damage(0 ,  pierce),imodbits_sword ],
["mak_sword3", "Xiphos", [("sword_xiphos_greek",0)], itp_type_one_handed_wpn|itp_primary, itc_scimitar|itcf_carry_sword_left_hip,105 , weight(2.5)|difficulty(8)|spd_rtng(96) | weapon_length(73)|swing_damage(30 , cut) | thrust_damage(0 ,  pierce),imodbits_sword ],

I hope some is able to help me.
 
Dion/Folcwar said:
Dawiduh said:
Check their dimentions in openbrf. it is possible they're either huge or tiny.
I am proberly very stupid, But I have no cleu what it is.
So I thought ya meant rules, so I used that and it says 75 .

Ok, you might have forgotten something in the code. My gladius code is this:

Code:
["hark_gladius", "Harkonnen Gladius", [("gladius",0),("gladius_scabbard", ixmesh_carry)], itp_type_one_handed_wpn|itp_merchandise|itp_primary, itc_longsword|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn,
 152 , weight(1)|difficulty(0)|spd_rtng(100) | weapon_length(53)|swing_damage(22, cut) | thrust_damage(30, pierce),imodbits_sword_high ],

Not sure the itp_merchandise has anything to do with your weapon not showing, but I have it in my code and you don't, also I have a scabbard for my weapons so I have the model called by ("gladius_scabbard",ixmesh_carry). maybe instead of that you should put a zero ( 0 ) instead of missing the whole string. Give it a try, I don't know for sure.
 
well, I know it should work since axes use the same sort.
and so do daggers, So I don't get it.
I added the itp merchendise but that just makes it buyable in stores :razz:

I also have more Items like this one but it just won't work.....
 
Status
Not open for further replies.
Back
Top Bottom