Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
MadVader said:
Use capitalization and punctuation, this is not a chat.
It is easy to implement skill-modifying items (like the 3 books), see script_game_get_skill_modifier_for_troop.

Changing attributes like STR is more difficult.
You need both to increase STR when the item is equipped or gets in inventory, and remove the STR bonus when it's unequiped or get sold or lost. Nothing too easy about it.

I did something like this in a mod. I defined an item slot to tell me if the item bonus is active or not (0/1). Then wrote a trigger that checked for all such attribute-changing items, if they are equipped or in inventory (depending on the item).
For example, we had a ring that gave you STR+1 when in inventory. The trigger code checks two things:
- if the ring is in inventory and its bonus is not applied (item slot = 0), increase player STR by 1 and set item slot = 1; the ring was just obtained
- if the ring is not in inventory and its bonus is applied (item slot = 1), decrease player STR by 1 and set item slot = 0; the ring was lost

More complicated conditions like dependencies between items are easy to do, it's just few more lines of code.

hrrrn yeah? so I need to define an item that always has the stat bonus triggered but is turned off if the item is not found within the inventory? is that what you are saying? ok well enough I understand.

You say for dependencies it requires a few more lines of code? how would this look like for example? do i simply define the item slots as normal but when i have tier branch item slots i tell it to turn item_slot## = 0 while its turned to = 1. but what does that code look like? should i just google tutorials for triggers is that covered in them?

thanks for the assistance.
 
Here's the code for the ring example:

Code:
slot_item_strength_bonus          = 9 # 0 or 1, used to check if strength bonus was already applied by this item
Code:
# update player attributes for rings and such
(1,[
    (try_begin),
        (player_has_item, "itm_ring"), # Doesn't work for equipped items
      (try_begin), # just got it
        (item_slot_eq, "itm_ring", slot_item_strength_bonus, 0),
        (troop_raise_attribute, "trp_player", ca_strength, 1),
        (item_set_slot, "itm_ring", slot_item_strength_bonus, 1),
      (try_end),
    (else_try), #lost it
      (item_slot_eq, "itm_ring", slot_item_strength_bonus, 1),
      (troop_raise_attribute, "trp_player", ca_strength, -1),
      (item_set_slot, "itm_ring", slot_item_strength_bonus, 0),
    (try_end),
]),

You should get familiar with operations to check whether items are equipped (troop_has_item_equipped) or in inventory (player_has_item) and combine them to see if other items are there or not to do your more complex checks.
 
Can anyone tell me which is the event when a player send a message to the server?

(A chat message I'm saying).

Thanks for the time and for reading this.
 
ive got another question, im trying to make my own map so I found this:
http://forums.taleworlds.com/index.php/topic,162501.0.html
now I am confused. what IS a map? is it a 2-Dimensional picture that you add 3-Dimensional vertices to via thogrim's map editor? Or is it an object file that you tweak using Thogrims map editor to tweak. or is it both and most people do one or the other, and thogrim's map editor translate these 3-Dimensional verts into complex list of coords that Mount and Blade Warband reads?
how do you guys figure out map coordinates? do you open map editor while editing town's .py files? because I never understood how people know exactly where to place, or move something. And the parties that travel across the map, do you automatically know the edge of the map space based off your map coords in the map file or do you define parties pathing?

too many questions... I think i can figure out map pathing but just want to understand what exactly makes up map file.

im not so sure i understand..
 
I'm with a big question if anyone can help me, here it goes:

I'm trying to add a new skill, so far i managed to add the skill going to Module_skill and using a reserved skill line.
But i can't figure out how to add an effect to this skill. I can only level it up, but it have no use at all.

So if anyone can tutor me into this, i want to add an effect to increases the hit points of the player (Above what ironflesh does) and an effect to increase the damage done (Above what power strike does). And please, don't tell me ironflesh and powerstrike already to this cauz i know that already.

And I also want to learn how to add an effect, so, don't want to change the ironflesh and powerstrike either. Only if it's the only way to make these effects comes true.
 
It's a silly skill, as you said. :smile:
Hit points are calculated from strength and Ironflesh, you can't just change them, except temporary in missions. That's hard for beginners. Same for additional damage in missions.
There is no skill effects file. If you learn how to do one skill, it doesn't mean you'll know how to do some other skill.
I suggest making an easier skill if you are learning. Like Yoloswag, that would be used in dialogs. It's like Persuasion, but actually the opposite.
Or, you know, be creative.
 
I've searched but haven't been able to find any helpful threads myself, if you can find one paste the link and I'll bow down to you.

Anyways, I'm trying to zoom out to get a full view of the world map I've made for a mod. However in Thorgrims and in-game I hit a limit on how far I can zoom out and cannot pull back the camera any further.

I've seen some pretty impressive map screenshots of very large campaign maps in their entirety, and I was wondering if anyone knew how to accomplish that.

Or is it just that you have to piece together multiple screenshots in a way that it appears you were able to capture the whole thing at once?
 
Hmm, I'm having trouble with making hitboxes for my Orcs. Is there a way to easily do this? How do I give the orcs hitboxes?
I've no idea where to start with this and I wondered if someone had experience here.
Thank you, I really hope someone can help with this and I'd be really grateful!
Cheers.

Edit: And yes, I've searched, and whilst there were a few hitbox related results, none of them seemed to relate to what I need much.
 
thick1988 said:
I've searched but haven't been able to find any helpful threads myself, if you can find one paste the link and I'll bow down to you.

Anyways, I'm trying to zoom out to get a full view of the world map I've made for a mod. However in Thorgrims and in-game I hit a limit on how far I can zoom out and cannot pull back the camera any further.

I've seen some pretty impressive map screenshots of very large campaign maps in their entirety, and I was wondering if anyone knew how to accomplish that.

Or is it just that you have to piece together multiple screenshots in a way that it appears you were able to capture the whole thing at once?

Have you tried hitting the space button to enlarge the minimap?
 
Cozur said:
thick1988 said:
I've searched but haven't been able to find any helpful threads myself, if you can find one paste the link and I'll bow down to you.

Anyways, I'm trying to zoom out to get a full view of the world map I've made for a mod. However in Thorgrims and in-game I hit a limit on how far I can zoom out and cannot pull back the camera any further.

I've seen some pretty impressive map screenshots of very large campaign maps in their entirety, and I was wondering if anyone knew how to accomplish that.

Or is it just that you have to piece together multiple screenshots in a way that it appears you were able to capture the whole thing at once?

Have you tried hitting the space button to enlarge the minimap?

If you're referring to the minimap in Thorgrim's, yes I've expanded the minimap to as large as possible, but it doesnt fill up the screen. It sort of stays a certain size and has a large black border around it.
 
thick1988 said:
Cozur said:
thick1988 said:
I've searched but haven't been able to find any helpful threads myself, if you can find one paste the link and I'll bow down to you.

Anyways, I'm trying to zoom out to get a full view of the world map I've made for a mod. However in Thorgrims and in-game I hit a limit on how far I can zoom out and cannot pull back the camera any further.

I've seen some pretty impressive map screenshots of very large campaign maps in their entirety, and I was wondering if anyone knew how to accomplish that.

Or is it just that you have to piece together multiple screenshots in a way that it appears you were able to capture the whole thing at once?

Have you tried hitting the space button to enlarge the minimap?

If you're referring to the minimap in Thorgrim's, yes I've expanded the minimap to as large as possible, but it doesnt fill up the screen. It sort of stays a certain size and has a large black border around it.

Have you tried expanding the game borders? I mean the red and yellow borders displayed in Thorgrims. The further away, the more of the map you can see in the map editors minimap.

On a completely different note, is there anyway to make it so that your own character and all the random lords in the game, keep their own gear when participating in a tournament?
 
No help for me at all?  :sad: I'm at a complete loss!
Jarvisimo said:
Hmm, I'm having trouble with making hitboxes for my Orcs. Is there a way to easily do this? How do I give the orcs hitboxes?
I've no idea where to start with this and I wondered if someone had experience here.
Thank you, I really hope someone can help with this and I'd be really grateful!
Cheers.

Edit: And yes, I've searched, and whilst there were a few hitbox related results, none of them seemed to relate to what I need much.
 
Jarvisimo said:
No help for me at all?  :sad: I'm at a complete loss!
Jarvisimo said:
Hmm, I'm having trouble with making hitboxes for my Orcs. Is there a way to easily do this? How do I give the orcs hitboxes?
I've no idea where to start with this and I wondered if someone had experience here.
Thank you, I really hope someone can help with this and I'd be really grateful!
Cheers.

Edit: And yes, I've searched, and whilst there were a few hitbox related results, none of them seemed to relate to what I need much.

Happy to tell you its very very easy to do  :grin:  Open up the skeletons.brf in commonres, select skel_human then go to edit, then copy hitboxes (not just copy but copy hitboxes). Now open up the brf where you have your orc skeleton, select your orc skeleton and then paste hitboxes. Simples  :grin:

Note when you close openbrf after you'v saved it with your new hitboxes it should say something like "open brf will change the skeletons.txt file" or something, allow it to do so. You'll be able to tell if its worked because when you reopen the orc sketon brf file in openbrf you will be check the box next to where it says hitboxes (under the animation box)
 
You can model your map in any 3D modeller and then import it to Thorgrim's. In case you want to add more detailed features. But I think it's way easier just importing a BMP in the editor and letting it do its job in creating the map.
 
Status
Not open for further replies.
Back
Top Bottom