Author Topic: Request information with regard to modding  (Read 7150 times)

Offline ithilienranger

  • Apprentice
  • *
  • Posts: 11
    • View Profile
Request information with regard to modding
« on: June 16, 2010, 10:53:32 am »
I would like python information regarding the player's mouse y values and anything to do with the aiming reticule.
I am trying to change how fast the weapon can fully aim and fire and add weapon kickback.

Offline Swyter

  • Administrator
  • *****
  • Posts: 414
  • �Star Wars Conquest Dev Team Coordinator
    • View Profile
    • [my tiny homepage]
Re: Request information with regard to modding
« Reply #1 on: June 16, 2010, 11:18:00 am »
I would like python information regarding the player's mouse y values and anything to do with the aiming reticule.
I am trying to change how fast the weapon can fully aim and fire and add weapon kickback.

Every M&B usable command it's located in the header_operations.py file, with the op-code that points out the final descriptor file. Also it includes some good orientative comments for every line, look here. It's a bit of the mouse controlling system used in Space Battles. If you or anyone uses this, please give me credit, lots of work behind this lines:
Code: [Select]
#STAR WARS CONQUEST MOD PROPERTY
# Part of BSG mouse movement integration
#Coded by Swyter

...
          (mouse_get_position, pos1),
          (set_fixed_point_multiplier, 1000),
          (position_get_x, ":mouse_x", pos1),
          (position_get_y, ":mouse_y", pos1),
 
...


Edit: Stripped only necessary code.

For XY mouse coords, I've done this code that fills a position table/array with those values.
The aiming reticle needs some weapong oriented programming, use the arrow positioning tracking, etc...

The rest it's essay and error...
My Mount&Blade Tools: � Iron Launcher for Warband � Iron Launcher ï¿½ Font Customiser � WarKit

Offline ithilienranger

  • Apprentice
  • *
  • Posts: 11
    • View Profile
Re: Request information with regard to modding
« Reply #2 on: June 16, 2010, 01:38:04 pm »
That is a great bit of code, but do I need any other code to integrate this. I am trying to make an automatic weapons mod with accurate weapon firing accuracies and kickback without recoding the whole MB firing code.

Also, I need help with changing the spd_rtng outside of the module_items.py file.
I am trying to use this format:

        (val_mul, spd_rtng, 10),

« Last Edit: June 16, 2010, 04:33:09 pm by ithilienranger »

Offline ithilienranger

  • Apprentice
  • *
  • Posts: 11
    • View Profile
Re: Request information with regard to modding
« Reply #3 on: June 16, 2010, 08:30:37 pm »
I need help with referencing the numeric value of the "spd_rtng" in an item list. I want to multiply the "spd_rtng" value by a certain factor.


        ["hunting_crossbow", "Hunting Crossbow", [("crossbow",0)], itp_type_crossbow |itp_merchandise|itp_primary|itp_two_handed 
        ,itcf_shoot_crossbow|itcf_carry_crossbow_back, 22 , weight(2.25)|difficulty(0)|spd_rtng(47) | shoot_speed(50) | thrust_damage(28
        ,pierce)|max_ammo(1),imodbits_crossbow ],



Offline Swyter

  • Administrator
  • *****
  • Posts: 414
  • �Star Wars Conquest Dev Team Coordinator
    • View Profile
    • [my tiny homepage]
Re: Request information with regard to modding
« Reply #4 on: June 17, 2010, 03:28:22 am »
I need help with referencing the numeric value of the "spd_rtng" in an item list. I want to multiply the "spd_rtng" value by a certain factor.


        ["hunting_crossbow", "Hunting Crossbow", [("crossbow",0)], itp_type_crossbow |itp_merchandise|itp_primary|itp_two_handed 
        ,itcf_shoot_crossbow|itcf_carry_crossbow_back, 22 , weight(2.25)|difficulty(0)|spd_rtng(47) | shoot_speed(50) | thrust_damage(28
        ,pierce)|max_ammo(1),imodbits_crossbow ],


You can't, they're fixed flagged values (object oriented), as far I know, can't be used as a variable in that and some other aspects, M&B is too limited...
My Mount&Blade Tools: � Iron Launcher for Warband � Iron Launcher ï¿½ Font Customiser � WarKit

vahadar

  • Guest
Re: Request information with regard to modding
« Reply #5 on: July 12, 2010, 12:00:37 pm »
Hello,

I'm replying to this thread i guess no need to open a new one ^^

I pm'd Revan Shan on TW about how the starship buying script process work and he told me to ask you Swyter ;)

So i am very curious how the starship icons on world map works in your mod. I know how to change player icons on world map with scripting, but how does the entire process work?  I am trying to do similar thing for an old mod i'm restarting, basically player will be able to use/purchase 4 vehicles and they will be shown on map. But i'm wondering how to make the purchasing/using part in scripting.

What i aim is : player can have 4 vehicles, 2 or 3 can be purchased and 1 will be used throu a companion. I have my idea on how to script for the companion part (little idea atm^^) my problem is for the other 3.

Maybe you could point me some diection to work ? ;)

Thank you in advance ! And keep the great work on that mod.

v

ps : forgive my english
« Last Edit: July 12, 2010, 12:03:50 pm by vahadar »

Offline Swyter

  • Administrator
  • *****
  • Posts: 414
  • �Star Wars Conquest Dev Team Coordinator
    • View Profile
    • [my tiny homepage]
Re: Request information with regard to modding
« Reply #6 on: July 12, 2010, 12:28:04 pm »
Hello,

I'm replying to this thread i guess no need to open a new one ^^

I pm'd Revan Shan on TW about how the starship buying script process work and he told me to ask you Swyter ;)

So i am very curious how the starship icons on world map works in your mod. I know how to change player icons on world map with scripting, but how does the entire process work?  I am trying to do similar thing for an old mod i'm restarting, basically player will be able to use/purchase 4 vehicles and they will be shown on map. But i'm wondering how to make the purchasing/using part in scripting.

What i aim is : player can have 4 vehicles, 2 or 3 can be purchased and 1 will be used throu a companion. I have my idea on how to script for the companion part (little idea atm^^) my problem is for the other 3.

Maybe you could point me some diection to work ? ;)

Thank you in advance ! And keep the great work on that mod.

v

ps : forgive my english

Easy: you need to create a presentation, a menu with buttons, images and 3d meshes... link those buttons with scripts and ship your mod...

PD: Don't worry, I'm Spanish
My Mount&Blade Tools: � Iron Launcher for Warband � Iron Launcher ï¿½ Font Customiser � WarKit

vahadar

  • Guest
Re: Request information with regard to modding
« Reply #7 on: July 12, 2010, 12:34:26 pm »
hehe well i guess your answer cover the entire process as requested  :green:

actually i was wondering mostly about the linking part script then (menu and rest of stuff) ;)

Offline Swyter

  • Administrator
  • *****
  • Posts: 414
  • �Star Wars Conquest Dev Team Coordinator
    • View Profile
    • [my tiny homepage]
Re: Request information with regard to modding
« Reply #8 on: July 13, 2010, 01:59:41 am »
hehe well i guess your answer cover the entire process as requested  :green:

actually i was wondering mostly about the linking part script then (menu and rest of stuff) ;)


I  know  :)

Well. You need to create a new presentation (at module_presentations.py) also you can get inspired by other code bits into the same file... basically presentations are custom GUIs, not only on menus, also at the map (aka scenes)... They have lots of uses, games... see Blackjack mod. Native credits screen... in game commanding menu... etc

You should be able to program buttons through conditionals:

(try_begin),
...
(else_try),
...
(try_end),

All the optcodes you can use for coding M&B modules are into header_operations.py file.


Hope it helps, if you have more doubts, don't worry... ask me... it's good to see people interested in the most deep M&B modding concept.  ;)
My Mount&Blade Tools: � Iron Launcher for Warband � Iron Launcher ï¿½ Font Customiser � WarKit

vahadar

  • Guest
Re: Request information with regard to modding
« Reply #9 on: July 13, 2010, 06:28:49 am »
Thanks for the tips Swyter,

I'll dig into those files see how they works

Regards ;)

v