covering the gaps of the module system documentation

Users who are viewing this thread

archlurps

Recruit
So, I asked for very basic help a bit ago and jik kindly pointed me towards "Ruthven's Beginning to Mod Thread".

I'll be focusing on the module system so far, since I'm more into that part than modelling and the likes. So I noticed that there are some "gaps" in the tutorial, that seem like rather integral parts of making a mod. I'll probably add more questions as I get my mod closer to finished, but let's start with these.

1. How do I manipulate skills? so if I want athletics to boost running speed way more, what do I change and where? Also is it the same and if not, in what way different, for modifying the magnitude of the effectiveness of proficiencies and attributes?
2. How do I change what the skills (and proficiencies, and attributes) effect. So if I, for example, wanted agility to make accuracy better while running, a bit like horse archery on foot, what would I change?
3. Black-shaded versions with an identical name seem to appear of the python files when i accidentally double click it and it apparently gets run in some way. Is it OK to delete these?
4.1 how binding are the warnings in the module system folders? Like in the module_game_menus.py (or something like that) there are warnings "This must be the second/third/fourth/etc window!!!". One of them seems to be the tournament menu, does this mean I can't modify the tournaments?
4.2 same with module_items_py, does it have to have a book called "de re militari" at the beginning of readable books, or only that they have to begin from the line or something that the book is?
5. Can I add more imodbits constants? like if I had firearms, I wouldn't want them to be "cracked", but "dilated", and I wouldn't want single-shot firearms to be able to be "jammed", and so on (just examples, a jammed weapon is quite useless, so it wouldn't be ideal as just a negatively effecting "bit")
6. in module_items_py, where do I reference the inventory image (not the mesh right?) of the item?
7. swing_damage seems to be the only one besides thrust_damage, so is there no separate "name" for the overhead swing? So would it be possible to make a shovel that hits blunt when swinged overhead, but cut when swinged from the sides and pierce if stabbed?
 
3. Black-shaded versions with an identical name seem to appear of the python files when i accidentally double click it and it apparently gets run in some way. Is it OK to delete these?

yes, it's ok to delete those... sounds like you haven't set the path for the ModuleSystem (MS).  if i'm wrong, please accept my apology.  check in the MS for "module_info" and change the path there to point to your mod, eg. "C:/Program Files/Mount&Blade/Modules/testit/"  and the 'black' copies ( which are compiled python files) should disappear.
 
Ok ... I'll try to answer them all.

  • 1. If you have "Notepad++", highlight all .py files with the module_ start, then right click and Open. Then CTRL + F and search for "athletics" in "All opened documents".
  • 2. Read above.
  • 3. Yes, as said before, it's ok to delete them. Do what TalonAquila said and they shouldn't come anymore... Also, be sure you run "build_module.bat" and not the other one.
  • 4. You can modify them, however, you cannot and must not change the order they are in the .py file.
  • 5. I'm quite sure you can create new imodbits contants, also alter the existing ones.
  • 6. I'm quite sure, again, that it automatically references the items.
  • 7. I don't think there is an seperate name for overhead swing. It's made that when you swing from side/overhead, it's swing_damage and when you "stab/thrust" it's thrust_damage. Quite sure again that you can make the swing_damage cut and thrust_damage pierce.
 
1. From what I understand, the affect of the skills is in the game engine.  This doesn't mean, that you can't alter what they do.  This is not something that a beginner MS coder might know how to do.  I have seen where people have used skills to boost jumping distances.  When you do something like this, you need to run a trigger that checks the specific key, then test the values that you want, then code the outcome.  I'm not sure you can affect the aiming accuracy in this way, but I've never tried or looked it up.  In the same way, you can boost skills with a key press.  I think you should look up Chel's (I think it was Chel that wrote it) code that gives special abilities in battle, such as rage, war cry, and some others.
2.  See above
3.  Answered
4.  Those I believe are the designer's notes.  I would, unless you know why they are they, follow them strictly.  This doesn't mean you can't make your own, or redirect the outcomes of those menus where you want.  Once you understand what is being done, and know all the areas you will affect, you can change what ever you want.  I've seen people make changes to code other than the tuples to vary inputs/outputs.  You just have to know what you are doing.  With the order of, say, items or troops, this is because they are marked in module_constants.py  These constants are referenced in various module files.  Changing the order of things can cause unexpected outcomes when these constants are used. 
5.  I don't think you can add more imodbits, I've seen posts on this around.  You may be able to alter the name, but not the affect.  The affects too were posted a while back.
6.  The game engine takes it's own picture from the mesh file, so unless you want to play with presentations and make a new picture for each item in game, it will have to stay as is.
7.  You might be able to code you own overhead attack swing tide to a key.  This way you could then have the damage separate, but I'm not sure how manual damage is set.  I believe it's always blunt, or has been in the once case where I did it.

Long story short, most of your questions are answered with experience and understanding of the MS.  I'm not there yet on all those and I've been at this since the beginning of the year.  Updating the tutorial doesn't make me an expert by far, but the tutorial is more to get people familiar with the way the module system works.  The best way is to go through header.operations.py and find the operations that suit what you will be doing.  Then look up (Notepad ++, use the Find> Find in all Files) and see how and where the operations are used.  After updating the tutorial, that's mostly what I did.  Find examples first, and then ask here if things are still not clear.

It would have been nice if the MS had better documentation, but we get what we get, and some have done some pretty awesome stuff with it.
 
1. ,2. Oh golly that turned out way harder than it seemed... I'll study the EGIII code someday, but for now I'll focus on renaming the items in my mod to something more fitting for the setting. Would I have to make the skills key-binded though? If I just wanted to magnify the effect, like making ironflesh give 20 more points instead of 10 and athletics make you run considerably faster, like literally one level meaning the difference of 5 levels now or thereabouts.
3. yep, worked :grin:...
4. menus do seem crazy complicated to me, so I'll see that later too
5. oh I don't mind the effect, just the name. If I ever get the mod finished, there'll be firearms in it. I don't wan to see a "balanced" or "cracked" ingram mac-10.
6. have I gotten the words (mesh, model, texture, aaargh) mixed up or have I been misunderstood? so if I wanted to have a chainsaw in a mod and I'd made the model, I don't have to provide a picture to show it in the shops and in the inventory, but the game takes it itself? I'm leaning towards me getting the words mixed up...
7. hmmh... well, then I'll just have to make the shovel a spear of sorts. Would've just been a nice touch to have.

new question

8. how do I determine which proficiency a weapon profits from? I would guess this is separate from what animations it uses because in EGIII the staff you get in melee battles on the arena is held (and handles with a shield) like a one-handed sword but I've been getting polearms proficiency using it.
 
archlurps said:
1. ,2. Oh golly that turned out way harder than it seemed... I'll study the EGIII code someday, but for now I'll focus on renaming the items in my mod to something more fitting for the setting. Would I have to make the skills key-binded though? If I just wanted to magnify the effect, like making ironflesh give 20 more points instead of 10 and athletics make you run considerably faster, like literally one level meaning the difference of 5 levels now or thereabouts.
3. yep, worked :grin:...
4. menus do seem crazy complicated to me, so I'll see that later too
5. oh I don't mind the effect, just the name. If I ever get the mod finished, there'll be firearms in it. I don't wan to see a "balanced" or "cracked" ingram mac-10.
6. have I gotten the words (mesh, model, texture, aaargh) mixed up or have I been misunderstood? so if I wanted to have a chainsaw in a mod and I'd made the model, I don't have to provide a picture to show it in the shops and in the inventory, but the game takes it itself? I'm leaning towards me getting the words mixed up...
7. hmmh... well, then I'll just have to make the shovel a spear of sorts. Would've just been a nice touch to have.

new question

8. how do I determine which proficiency a weapon profits from? I would guess this is separate from what animations it uses because in EGIII the staff you get in melee battles on the arena is held (and handles with a shield) like a one-handed sword but I've been getting polearms proficiency using it.

mesh - the 3D model that the object is made from (generally same as model)
texture - The DDS image file that is "wrapped" on the mesh to give it a more realistic look (other than having the mesh a white blob).

With weapons you can define how it's held and what kind of swings it uses.  Look in the header_items.py file.  Then look as something like a dagger, and compare the parts of the tuple to that of say a lance or a 2 handed sword.  The item flags define what the object is more than anything else.
 
archlurps said:
1. ,2. Oh golly that turned out way harder than it seemed... I'll study the EGIII code someday, but for now I'll focus on renaming the items in my mod to something more fitting for the setting. Would I have to make the skills key-binded though? If I just wanted to magnify the effect, like making ironflesh give 20 more points instead of 10 and athletics make you run considerably faster, like literally one level meaning the difference of 5 levels now or thereabouts.

I might be wrong, but I think the effects of skills are hardcoded. Although I haven't looked for the possiblity of changing it.

archlurps said:
8. how do I determine which proficiency a weapon profits from? I would guess this is separate from what animations it uses because in EGIII the staff you get in melee battles on the arena is held (and handles with a shield) like a one-handed sword but I've been getting polearms proficiency using it.

I think itm_type_polearm tag makes it a polearm for proficiency purposes. The way it handles when you swing it is defined by itc_staff (for example) tag, which can be kind-of customized in header_items to contain different animations.
 
archlurps said:
6. in module_items_py, where do I reference the inventory image (not the mesh right?) of the item?

The game automatically creates an inventory image from the objects mesh. However, you can specify another mesh to show up for the inventory pic if you want to. You just have to add a new mesh to the items mesh list and give it the ixmesh_inventory modifier bit.

For an example here is the first part of an item from my mod that uses this:
["sedai_ring_a","Great Serpent Ring", [("sedai_ring_L",0),("sedai_ring_inv",ixmesh_inventory)], itp_type_hand_armor|itp_unique|itp_civilian ,0, 10000,


 
Back
Top Bottom