Starting scripting with my mod

Users who are viewing this thread

Siloer

Banned
Ok hello guys i never scripted before and i really would like to learn this,

And i wanted to have same people i can talk on steam to maybe learn my a thing or two

I did same random tweaking but i have no idea where to start my own stuff instead of following tutorials

I want to make an mod based pure based on buildings and kingdom customization and also when you enter the scene you see the changed made, I know this goes in Module_game_menus but which codes do i use no idea XD

Any help?? we discuss it further here or on steam
 
You remind me of myself when I first started modding... Ah, good times... well, Good Luck:mrgreen:

:lol: :lol: :lol:

Alright Honestly You'll have to teach yourself. I started out using programs to edit items. TweakMB came in handy too. After messing with tools, much time here trolling on the forums, slowly learning the effects that tools had on the .txt files, and then learning how the .txt files reflect the module system. It all became 2nd Nature for me. I understood how the game worked. My previous experience with making mods/scripts for Populous 3 really helped me out (If, Else, And, Try, Or, etc).

That and the fact that I like math (not love). I ended up really teaching myself how the game works.

SN:
I just noticed I've been promoted to a Knight! Lucky me!
 
Computica said:
You remind me of myself when I first started modding... Ah, good times... well, Good Luck:mrgreen:

:lol: :lol: :lol:

Alright Honestly You'll have to teach yourself. I started out using programs to edit items. TweakMB came in handy too. After messing with tools, much time here trolling on the forums, slowly learning the effects that tools had on the .txt files, and then learning how the .txt files reflect the module system. It all became 2nd Nature for me. I understood how the game worked. My previous experience with making mods/scripts for Populous 3 really helped me out (If, Else, And, Try, Or, etc).

That and the fact that I like math (not love). I ended up really teaching myself how the game works.

SN:
I just noticed I've been promoted to a Knight! Lucky me!

Great story mate :grin:

Yes i tried alot myself but i have this idea what can't pop out because i dont have the experience for it and i keep trying and searching its soo frustrating. Well i keep continue trying then

I like math but i suck at it, Will it by wise to even learn scripting if i cant do math
 
Siloer said:
Computica said:
You remind me of myself when I first started modding... Ah, good times... well, Good Luck:mrgreen:

:lol: :lol: :lol:

Alright Honestly You'll have to teach yourself. I started out using programs to edit items. TweakMB came in handy too. After messing with tools, much time here trolling on the forums, slowly learning the effects that tools had on the .txt files, and then learning how the .txt files reflect the module system. It all became 2nd Nature for me. I understood how the game worked. My previous experience with making mods/scripts for Populous 3 really helped me out (If, Else, And, Try, Or, etc).

That and the fact that I like math (not love). I ended up really teaching myself how the game works.

SN:
I just noticed I've been promoted to a Knight! Lucky me!

Great story mate :grin:

Yes i tried alot myself but i have this idea what can't pop out because i dont have the experience for it and i keep trying and searching its soo frustrating. Well i keep continue trying then

I like math but i suck at it, Will it by wise to even learn scripting if i cant do math
The math isn't necessary but a good calculator would come in handy. You'll have to be able to read scripts... like this one:
I'm going to explain to you what this script does using "#--". If you can read them then modding will be much easier for you.

  # script_npc_get_troop_wage #--This is a script. Scripts are called upon by the game engine or by other scripts
  # This script is called from module system to calculate troop wages for npc parties. #--Someone left a note explaining what it does. Note the "#" symbol he used it can be a life saver.
  # Input: #-- There is no input value in this script
  # param1: troop_id #--You will only need an troop_id for this script to work.
  # Output: reg0: weekly wage #-- It will store a number value into "reg0". These are used to store values temporarily for use in another section of code after the script was called

  ("npc_get_troop_wage", #--Name of script so you can call it. ex: (call_script, "script_npc_get_troop_wage", ":stack_troop", ":party_no"),
    [
      (store_script_param_1, ":troop_id"), #--storing the troop into ":troop_id" so we can use that value.
      (assign,":wage", 0), #--We made a new value called ":wage" and  made its value 0
      (try_begin), #--Right here were going to make an attempt to do something. If the conditions are not met then it will move on to the next block of code
        (troop_is_hero, ":troop_id"), #--If the troop is a hero then it will continue coding after the "try_end"
      (else_try), #-- If the troop is not a hero it will try something else
        (store_character_level, ":wage", ":troop_id"), #Now were storing the level of the troop. Ex:Troop is level 18 which "wage" is now 18
        (val_mul, ":wage", ":wage"), #--18 * 18 = 324 | Here we multiplied and made the value of "wage" 324 now
        (val_add, ":wage", 50), #-- 324 + 50 = 374 | The variable or number to the left is replaced with the mathematical outcome when "val_" is used
        (val_div, ":wage", 30), #-- 374 / 30 = 12 | I dropped the decimal stuff in the example so you can understand this easier
        (troop_is_mounted, ":troop_id"), #-- If the troop is mounted then continue, if not got to the next block after "try_end"
        (val_mul, ":wage", 5), #-- 12 * 5 = 60
        (val_div, ":wage", 4), #-- 60 / 4 = 15
      (try_end), #--This is where the "try_begin" ends at. You can have multiplte try_begins (and try_ends) in each other. They work more like layers of a cake.
      (assign, reg0, ":wage"), #--We assign what the wage is for you use after the script is called. 12 denars for an unmounted troop, 15 for a mounted one.
  ]), #--This closes the script so you know it has ended. Remember these work like layers on a cake too. though somewhat limited.


That's all I've got for you.
 
Computica said:
Siloer said:
Computica said:
You remind me of myself when I first started modding... Ah, good times... well, Good Luck:mrgreen:

:lol: :lol: :lol:

Alright Honestly You'll have to teach yourself. I started out using programs to edit items. TweakMB came in handy too. After messing with tools, much time here trolling on the forums, slowly learning the effects that tools had on the .txt files, and then learning how the .txt files reflect the module system. It all became 2nd Nature for me. I understood how the game worked. My previous experience with making mods/scripts for Populous 3 really helped me out (If, Else, And, Try, Or, etc).

That and the fact that I like math (not love). I ended up really teaching myself how the game works.

SN:
I just noticed I've been promoted to a Knight! Lucky me!

Great story mate :grin:

Yes i tried alot myself but i have this idea what can't pop out because i dont have the experience for it and i keep trying and searching its soo frustrating. Well i keep continue trying then

I like math but i suck at it, Will it by wise to even learn scripting if i cant do math
The math isn't necessary but a good calculator would come in handy. You'll have to be able to read scripts... like this one:
I'm going to explain to you what this script does using "#--". If you can read them then modding will be much easier for you.

  # script_npc_get_troop_wage #--This is a script. Scripts are called upon by the game engine or by other scripts
  # This script is called from module system to calculate troop wages for npc parties. #--Someone left a note explaining what it does. Note the "#" symbol he used it can be a life saver.
  # Input: #-- There is no input value in this script
  # param1: troop_id #--You will only need an troop_id for this script to work.
  # Output: reg0: weekly wage #-- It will store a number value into "reg0". These are used to store values temporarily for use in another section of code after the script was called

  ("npc_get_troop_wage", #--Name of script so you can call it. ex: (call_script, "script_npc_get_troop_wage", ":stack_troop", ":party_no"),
    [
      (store_script_param_1, ":troop_id"), #--storing the troop into ":troop_id" so we can use that value.
      (assign,":wage", 0), #--We made a new value called ":wage" and  made its value 0
      (try_begin), #--Right here were going to make an attempt to do something. If the conditions are not met then it will move on to the next block of code
        (troop_is_hero, ":troop_id"), #--If the troop is a hero then it will continue coding after the "try_end"
      (else_try), #-- If the troop is not a hero it will try something else
        (store_character_level, ":wage", ":troop_id"), #Now were storing the level of the troop. Ex:Troop is level 18 which "wage" is now 18
        (val_mul, ":wage", ":wage"), #--18 * 18 = 324 | Here we multiplied and made the value of "wage" 324 now
        (val_add, ":wage", 50), #-- 324 + 50 = 374 | The variable or number to the left is replaced with the mathematical outcome when "val_" is used
        (val_div, ":wage", 30), #-- 374 / 30 = 12 | I dropped the decimal stuff in the example so you can understand this easier
        (troop_is_mounted, ":troop_id"), #-- If the troop is mounted then continue, if not got to the next block after "try_end"
        (val_mul, ":wage", 5), #-- 12 * 5 = 60
        (val_div, ":wage", 4), #-- 60 / 4 = 15
      (try_end), #--This is where the "try_begin" ends at. You can have multiplte try_begins (and try_ends) in each other. They work more like layers of a cake.
      (assign, reg0, ":wage"), #--We assign what the wage is for you use after the script is called. 12 denars for an unmounted troop, 15 for a mounted one.
  ]), #--This closes the script so you know it has ended. Remember these work like layers on a cake too. though somewhat limited.


That's all I've got for you.

I think i can read it do you got steam soo that we can further discuss this script btw i really would love to know you better

EDIT: mine is qunlord
 
Siloer said:
Computica said:
Siloer said:
Computica said:
You remind me of myself when I first started modding... Ah, good times... well, Good Luck:mrgreen:

:lol: :lol: :lol:

Alright Honestly You'll have to teach yourself. I started out using programs to edit items. TweakMB came in handy too. After messing with tools, much time here trolling on the forums, slowly learning the effects that tools had on the .txt files, and then learning how the .txt files reflect the module system. It all became 2nd Nature for me. I understood how the game worked. My previous experience with making mods/scripts for Populous 3 really helped me out (If, Else, And, Try, Or, etc).

That and the fact that I like math (not love). I ended up really teaching myself how the game works.

SN:
I just noticed I've been promoted to a Knight! Lucky me!

Great story mate :grin:

Yes i tried alot myself but i have this idea what can't pop out because i dont have the experience for it and i keep trying and searching its soo frustrating. Well i keep continue trying then

I like math but i suck at it, Will it by wise to even learn scripting if i cant do math
The math isn't necessary but a good calculator would come in handy. You'll have to be able to read scripts... like this one:
I'm going to explain to you what this script does using "#--". If you can read them then modding will be much easier for you.

  # script_npc_get_troop_wage #--This is a script. Scripts are called upon by the game engine or by other scripts
  # This script is called from module system to calculate troop wages for npc parties. #--Someone left a note explaining what it does. Note the "#" symbol he used it can be a life saver.
  # Input: #-- There is no input value in this script
  # param1: troop_id #--You will only need an troop_id for this script to work.
  # Output: reg0: weekly wage #-- It will store a number value into "reg0". These are used to store values temporarily for use in another section of code after the script was called

  ("npc_get_troop_wage", #--Name of script so you can call it. ex: (call_script, "script_npc_get_troop_wage", ":stack_troop", ":party_no"),
    [
      (store_script_param_1, ":troop_id"), #--storing the troop into ":troop_id" so we can use that value.
      (assign,":wage", 0), #--We made a new value called ":wage" and  made its value 0
      (try_begin), #--Right here were going to make an attempt to do something. If the conditions are not met then it will move on to the next block of code
        (troop_is_hero, ":troop_id"), #--If the troop is a hero then it will continue coding after the "try_end"
      (else_try), #-- If the troop is not a hero it will try something else
        (store_character_level, ":wage", ":troop_id"), #Now were storing the level of the troop. Ex:Troop is level 18 which "wage" is now 18
        (val_mul, ":wage", ":wage"), #--18 * 18 = 324 | Here we multiplied and made the value of "wage" 324 now
        (val_add, ":wage", 50), #-- 324 + 50 = 374 | The variable or number to the left is replaced with the mathematical outcome when "val_" is used
        (val_div, ":wage", 30), #-- 374 / 30 = 12 | I dropped the decimal stuff in the example so you can understand this easier
        (troop_is_mounted, ":troop_id"), #-- If the troop is mounted then continue, if not got to the next block after "try_end"
        (val_mul, ":wage", 5), #-- 12 * 5 = 60
        (val_div, ":wage", 4), #-- 60 / 4 = 15
      (try_end), #--This is where the "try_begin" ends at. You can have multiplte try_begins (and try_ends) in each other. They work more like layers of a cake.
      (assign, reg0, ":wage"), #--We assign what the wage is for you use after the script is called. 12 denars for an unmounted troop, 15 for a mounted one.
  ]), #--This closes the script so you know it has ended. Remember these work like layers on a cake too. though somewhat limited.


That's all I've got for you.

I think i can read it do you got steam soo that we can further discuss this script btw i really would love to know you better

EDIT: mine is qunlord
Mines is Computica, I don't have time for chat though. I'm very busy with my mod.
 
To prevent a giant quote topic I'll start without one XD

I already had some coding experience in my backpack so i don't know if this way is clear enough for you but if you start with the module system documentation everything will start to clear up.
All the other answers i found in header_operations.
And when i got stuck (happened one time with me and got great help here) you visit the Q&A Thread.
For starting you could start to search and try to insert just some random scripts you find here because what you want is more only a scripters journey and this way you learn how scripting works.

:wink: The best of success. Hopefully you are the chosen one to make the custom settlements for warband.
 
header_operations helps a lot and trying to read module_game_menus to.

I started last year with no previous experience in scripting and now I'm able to do many good things in MS(module system) by myself
 
As you've never done any programming before, it might be useful for you to Google/Wikipedia control and conditional operations. "If-Then-Else" "For-Next", loops, etc.

Also, see the syntax link in my signature. Be sure to read the various module system guides.

Best way to learn is to read pieces of code (either straight from the module system or that are posted on the forum) that you understand the purpose of and then work your way through them line-by-line.
 
Siloer said:
Thanks for all the support guys i will definintly use all advice

I'm a starter modder myself, tho I alrdy have some experience in changing troop cloths in Mount&Blade 1.011. wich probaly could be outdated.
I've also made my own Sargoth version in singleplayer and ported it as a multiplayer map to that fully functions with AI meshes setted up to minimize bots running  around like headless chickens.
Only exception on that is that adding that multiplayer map is that all the map names got mixed up and is called something else, currently working out how to fix that but it works so :grin:.

I dont mind chatting around on Steam or Skype as I'm actually trying to make my first mod.
With edited singleplayer towns and some added multiplayer maps perhaps.
Just say the word and off we go :grin:.
 
Delzaros said:
Siloer said:
Thanks for all the support guys i will definintly use all advice

I'm a starter modder myself, tho I alrdy have some experience in changing troop cloths in Mount&Blade 1.011. wich probaly could be outdated.
I've also made my own Sargoth version in singleplayer and ported it as a multiplayer map to that fully functions with AI meshes setted up to minimize bots running  around like headless chickens.
Only exception on that is that adding that multiplayer map is that all the map names got mixed up and is called something else, currently working out how to fix that but it works so :grin:.

I dont mind chatting around on Steam or Skype as I'm actually trying to make my first mod.
With edited singleplayer towns and some added multiplayer maps perhaps.
Just say the word and off we go :grin:.

Well ok sure :grin: add my qunlord is the name
 
All you need to start is here, really. Well, that's how I started anyways, following almost all the chapters one by one from 1 to 9.
http://forums.taleworlds.com/index.php/board,12.0.html

I definitely won't say I am a great modder, but my lil'e Rigale is growing, the thread above started it all.

Good luck, make extensive use of the Notepad++ search tool  :wink:
 
Back
Top Bottom