Author Topic: Ask Winter  (Read 65709 times)

grailknighthero

  • Guest
Re: Ask Winter
« Reply #105 on: June 27, 2008, 03:50:14 PM »
Another problem I cant figure out.  This is for custom battles.

game menu

(set_visitor, 0, "$qb_player"),  # player troop (assign, "$qb_player", "trp_quick_battle_bretonnian"), assigned above = Lord Montfort
                 (set_visitors, 1, "trp_b_pb1", 5), # peasant bowmen
                 (set_visitors, 2, "trp_b_pb1", 5), # peasant bowman
                 (set_visitors, 3, "trp_b_m_a_a1", 1),
                 (set_visitors, 4, "trp_b_m_a_a2", 1),
                 (set_visitors, 5, "trp_b_m_a_a3", 1),


                 (set_visitors, 10, "trp_e_m_chief", 1),
                 (set_visitors, 11, "trp_e_m_mcg", 1),
                 (set_visitors, 12, "trp_e_m_m1", 1),
                 (set_visitors, 13, "trp_e_m_m2", 1),
                 (set_visitors, 14, "trp_e_m_m3", 1),
                 (set_visitors, 20, "trp_e_m_mh1", 1),  # the only marauder horsemen spawned



The marauder horsemen is hard to see but it is listed twice, once at -1 and once at 20.

Offline Winter

  • I am Tek Jansen!
  • Administrator
  • *****
  • Posts: 476
  • MBX Forum owner
    • View Profile
    • Street of Eyes: The Writing of Ryan A. Span
Re: Ask Winter
« Reply #106 on: June 28, 2008, 04:33:51 AM »
Lord Montfort also appears twice in there, one time at entry -1. Are you actually seeing clones being deployed in the battle?

Regards,
Ryan

grailknighthero

  • Guest
Re: Ask Winter
« Reply #107 on: June 28, 2008, 05:15:12 AM »
Nope, there are no duplicates in battle....hmmm

Actually, I think I just figured it out.  It is because those two agents are mounted.  I was afraid the -1s would affect a script, but they wont because I use the agent is human operation.

Offline Winter

  • I am Tek Jansen!
  • Administrator
  • *****
  • Posts: 476
  • MBX Forum owner
    • View Profile
    • Street of Eyes: The Writing of Ryan A. Span
Re: Ask Winter
« Reply #108 on: June 28, 2008, 06:40:11 AM »
Nope, there are no duplicates in battle....hmmm

Actually, I think I just figured it out.  It is because those two agents are mounted.  I was afraid the -1s would affect a script, but they wont because I use the agent is human operation.

Interesting bit of data there, horses getting spawned with an entry of -1? Probably never useful, but interesting . . .

Regards,
Ryan

grailknighthero

  • Guest
Re: Ask Winter
« Reply #109 on: June 30, 2008, 08:11:53 PM »
Is this the same as neq for a slot?

(neg|agent_slot_eq,":agent",slot_agent_is_formation_leader,1),

Just wondering because you don't have something like it in your operations.

Offline Winter

  • I am Tek Jansen!
  • Administrator
  • *****
  • Posts: 476
  • MBX Forum owner
    • View Profile
    • Street of Eyes: The Writing of Ryan A. Span
Re: Ask Winter
« Reply #110 on: July 01, 2008, 02:11:05 AM »
Is this the same as neq for a slot?

(neg|agent_slot_eq,":agent",slot_agent_is_formation_leader,1),

Just wondering because you don't have something like it in your operations.

Yes, it's the same. If you look in header_operations, neq itself is only an amalgamation of neg|eq. My operations are a little bit out of date nowadays.

Regards,
Ryan

grailknighthero

  • Guest
Re: Ask Winter
« Reply #111 on: July 12, 2008, 04:48:14 AM »
Can I do something like this:

module constants

"$overlay_checkbox_unit1" = 0
"$overlay_checkbox_unit2" = 0
"$overlay_checkbox_unit3" = 0

module scripts

(assign, ":checkbox", 0),
(try_for_range, ":i", 0, 3),
       (store_add, ":checkbox", "$overlay_checkbox_unit1", ":i"),
       (statements)
(try_end),

and have checkbox be the variable.  I am thinking no, because it is not something like a slot, a troop, etc and is not assigned in ascending order.   What I want to do is make a for or recursive statement that runs multiple times and each time the next variable is used, so I do not have to have a try_begin else_try statement with 14 else_try's.

Offline Winter

  • I am Tek Jansen!
  • Administrator
  • *****
  • Posts: 476
  • MBX Forum owner
    • View Profile
    • Street of Eyes: The Writing of Ryan A. Span
Re: Ask Winter
« Reply #112 on: July 12, 2008, 10:21:07 AM »
Can I do something like this:

module constants

"$overlay_checkbox_unit1" = 0
"$overlay_checkbox_unit2" = 0
"$overlay_checkbox_unit3" = 0

module scripts

(assign, ":checkbox", 0),
(try_for_range, ":i", 0, 3),
       (store_add, ":checkbox", "$overlay_checkbox_unit1", ":i"),
       (statements)
(try_end),

and have checkbox be the variable.  I am thinking no, because it is not something like a slot, a troop, etc and is not assigned in ascending order.   What I want to do is make a for or recursive statement that runs multiple times and each time the next variable is used, so I do not have to have a try_begin else_try statement with 14 else_try's.

No, the only way you can access variable destinations is by using slots. Variables and registers don't have that capability in M&B.

What you can do is simply loop it to use a new slot each time.

Regards,
Ryan

Highlander

  • Guest
Re: Ask Winter
« Reply #113 on: July 21, 2008, 04:42:19 PM »
I have the following problem:
I have a troop who doesn't take the weapon I give him.
This troop has a thrown weapon and a shield in his inventory. guarantee_shield and guarantee_ranged are both used and the thrown weapon is not two handed. It's basicly the same as itm_stones with another mesh and other stats.
The problem is, that the shield doesn't show up. Neither at the hands of the troops nor at the backs. When I remove the thrown weapon, it suddenly shows up. Any ideas?

Offline Ron Losey

  • Master
  • *****
  • Posts: 4418
    • View Profile
Re: Ask Winter
« Reply #114 on: July 21, 2008, 09:53:28 PM »
I have the following problem:
I have a troop who doesn't take the weapon I give him.
This troop has a thrown weapon and a shield in his inventory. guarantee_shield and guarantee_ranged are both used and the thrown weapon is not two handed. It's basicly the same as itm_stones with another mesh and other stats.
The problem is, that the shield doesn't show up. Neither at the hands of the troops nor at the backs. When I remove the thrown weapon, it suddenly shows up. Any ideas?

Systematic elimination first.  Try replacing the item stats with the ones from native thrown stone, and see if it works.  Then replace the mesh with a known working one (like the native stone) and try it.  Those two tests will get it down to either one line of code or one mesh.  At least isolate the bug.

Highlander

  • Guest
Re: Ask Winter
« Reply #115 on: July 22, 2008, 03:20:07 AM »
Thanks. I found the problem.
Believe it or not, but it seems that troops only carry shields with thrown weapons, if they have an one-handed melee weapon as well.

grailknighthero

  • Guest
Re: Ask Winter
« Reply #116 on: July 22, 2008, 02:03:35 PM »
Interesting to know, is it any melee weapon, or does it have specifics like 2 handed polearm as well.  Im guessing it is a bug and not something Armagan planned on.

Tamuli

  • Guest
Re: Ask Winter
« Reply #117 on: August 17, 2008, 06:46:18 PM »
What have I done wrong?
I followed the "Part 1" tutorial exactly, but got the error several time:
Traceback (most recent call last):
  File "process_init.py", line 1, in ?
    from module_info import *
  File "module_info.py", line 5
    export_dir = "C:/Documents and Settings/HP_Administrator/Desktop/Mount&Blade
/Modules/Eire

            ^
SyntaxError: invalid token
Traceback (most recent call last):
  File "process_global_variables.py", line 4, in ?
    from module_info import *
  File "module_info.py", line 5
    export_dir = "C:/Documents and Settings/HP_Administrator/Desktop/Mount&Blade
/Modules/Eire

            ^
SyntaxError: invalid token
Traceback (most recent call last):
  File "process_strings.py", line 3, in ?
    from module_info import *
  File "module_info.py", line 5
    export_dir = "C:/Documents and Settings/HP_Administrator/Desktop/Mount&Blade
/Modules/Eire

            ^
SyntaxError: invalid token
Traceback (most recent call last):
  File "process_skills.py", line 3, in ?
    from module_info import *
  File "module_info.py", line 5
    export_dir = "C:/Documents and Settings/HP_Administrator/Desktop/Mount&Blade
/Modules/Eire

            ^
SyntaxError: invalid token
Traceback (most recent call last):
  File "process_music.py", line 3, in ?
    from module_info import *
  File "module_info.py", line 5
    export_dir = "C:/Documents and Settings/HP_Administrator/Desktop/Mount&Blade
/Modules/Eire

            ^
SyntaxError: invalid token
Traceback (most recent call last):
  File "process_animations.py", line 3, in ?
    from module_info import *
  File "module_info.py", line 5
    export_dir = "C:/Documents and Settings/HP_Administrator/Desktop/Mount&Blade
/Modules/Eire

            ^
SyntaxError: invalid token
Traceback (most recent call last):
  File "process_meshes.py", line 3, in ?
    from module_info import *
  File "module_info.py", line 5
    export_dir = "C:/Documents and Settings/HP_Administrator/Desktop/Mount&Blade
/Modules/Eire

            ^
SyntaxError: invalid token
Traceback (most recent call last):
  File "process_sounds.py", line 2, in ?
    from module_info import *
  File "module_info.py", line 5
    export_dir = "C:/Documents and Settings/HP_Administrator/Desktop/Mount&Blade
/Modules/Eire

            ^
SyntaxError: invalid token
Traceback (most recent call last):
  File "process_skins.py", line 3, in ?
    from module_info import *
  File "module_info.py", line 5
    export_dir = "C:/Documents and Settings/HP_Administrator/Desktop/Mount&Blade
/Modules/Eire

            ^
SyntaxError: invalid token
Traceback (most recent call last):
  File "process_map_icons.py", line 2, in ?
    from module_info import *
  File "module_info.py", line 5
    export_dir = "C:/Documents and Settings/HP_Administrator/Desktop/Mount&Blade
/Modules/Eire

            ^
SyntaxError: invalid token
Traceback (most recent call last):
  File "process_factions.py", line 1, in ?
    from module_info import *
  File "module_info.py", line 5
    export_dir = "C:/Documents and Settings/HP_Administrator/Desktop/Mount&Blade
/Modules/Eire

            ^
SyntaxError: invalid token
Exporting item data...
Traceback (most recent call last):
  File "process_items.py", line 56, in ?
    from module_info import *
  File "module_info.py", line 5
    export_dir = "C:/Documents and Settings/HP_Administrator/Desktop/Mount&Blade
/Modules/Eire

            ^
SyntaxError: invalid token
Traceback (most recent call last):
  File "process_scenes.py", line 1, in ?
    from module_info import *
  File "module_info.py", line 5
    export_dir = "C:/Documents and Settings/HP_Administrator/Desktop/Mount&Blade
/Modules/Eire

            ^
SyntaxError: invalid token
Traceback (most recent call last):
  File "process_troops.py", line 3, in ?
    from module_info import *
  File "module_info.py", line 5
    export_dir = "C:/Documents and Settings/HP_Administrator/Desktop/Mount&Blade
/Modules/Eire

            ^
SyntaxError: invalid token
Traceback (most recent call last):
  File "process_particle_sys.py", line 1, in ?
    from module_info import *
  File "module_info.py", line 5
    export_dir = "C:/Documents and Settings/HP_Administrator/Desktop/Mount&Blade
/Modules/Eire

            ^
SyntaxError: invalid token
Traceback (most recent call last):
  File "process_scene_props.py", line 3, in ?
    from module_info import *
  File "module_info.py", line 5
    export_dir = "C:/Documents and Settings/HP_Administrator/Desktop/Mount&Blade
/Modules/Eire

            ^
SyntaxError: invalid token
Traceback (most recent call last):
  File "process_tableau_materials.py", line 4, in ?
    from module_info import *
  File "module_info.py", line 5
    export_dir = "C:/Documents and Settings/HP_Administrator/Desktop/Mount&Blade
/Modules/Eire

            ^
SyntaxError: invalid token
Traceback (most recent call last):
  File "process_presentations.py", line 3, in ?
    from module_info import *
  File "module_info.py", line 5
    export_dir = "C:/Documents and Settings/HP_Administrator/Desktop/Mount&Blade
/Modules/Eire

            ^
SyntaxError: invalid token
Traceback (most recent call last):
  File "process_party_tmps.py", line 1, in ?
    from module_info import *
  File "module_info.py", line 5
    export_dir = "C:/Documents and Settings/HP_Administrator/Desktop/Mount&Blade
/Modules/Eire

            ^
SyntaxError: invalid token
Traceback (most recent call last):
  File "process_parties.py", line 3, in ?
    from module_info import *
  File "module_info.py", line 5
    export_dir = "C:/Documents and Settings/HP_Administrator/Desktop/Mount&Blade
/Modules/Eire

            ^
SyntaxError: invalid token
Traceback (most recent call last):
  File "process_quests.py", line 3, in ?
    from module_info import *
  File "module_info.py", line 5
    export_dir = "C:/Documents and Settings/HP_Administrator/Desktop/Mount&Blade
/Modules/Eire

            ^
SyntaxError: invalid token
Traceback (most recent call last):
  File "process_scripts.py", line 3, in ?
    from module_info import *
  File "module_info.py", line 5
    export_dir = "C:/Documents and Settings/HP_Administrator/Desktop/Mount&Blade
/Modules/Eire

            ^
SyntaxError: invalid token
Traceback (most recent call last):
  File "process_mission_tmps.py", line 4, in ?
    from module_info import *
  File "module_info.py", line 5
    export_dir = "C:/Documents and Settings/HP_Administrator/Desktop/Mount&Blade
/Modules/Eire

            ^
SyntaxError: invalid token
Traceback (most recent call last):
  File "process_game_menus.py", line 4, in ?
    from module_info import *
  File "module_info.py", line 5
    export_dir = "C:/Documents and Settings/HP_Administrator/Desktop/Mount&Blade
/Modules/Eire

            ^
SyntaxError: invalid token
Traceback (most recent call last):
  File "process_simple_triggers.py", line 1, in ?
    from module_info import *
  File "module_info.py", line 5
    export_dir = "C:/Documents and Settings/HP_Administrator/Desktop/Mount&Blade
/Modules/Eire

            ^
SyntaxError: invalid token
Traceback (most recent call last):
  File "process_dialogs.py", line 4, in ?
    from module_info import *
  File "module_info.py", line 5
    export_dir = "C:/Documents and Settings/HP_Administrator/Desktop/Mount&Blade
/Modules/Eire

            ^
SyntaxError: invalid token
Traceback (most recent call last):
  File "process_global_variables_unused.py", line 1, in ?
    from module_info import *
  File "module_info.py", line 5
    export_dir = "C:/Documents and Settings/HP_Administrator/Desktop/Mount&Blade
/Modules/Eire

            ^
SyntaxError: invalid token

______________________________

Script processing has ended.
Press any key to exit. . .

Offline KON_Air

  • Craftsman
  • **
  • Posts: 110
    • View Profile
Re: Ask Winter
« Reply #118 on: August 18, 2008, 06:20:47 PM »
"C:/Documents and Settings/HP_Administrator/Desktop/Mount&Blade/Modules/Eire

"C:/Documents and Settings/HP_Administrator/Desktop/Mount&Blade/Modules/Eire"

Tamuli

  • Guest
Re: Ask Winter
« Reply #119 on: August 19, 2008, 07:09:00 PM »
I got that fixed, it turns out I'd been following the Module Documentian to literally, I'd installed it somewere else to were python was looking.
But now I have a new problem... >:(
Every time I start M&B I get the first assertion error and all I have to do is click 10x, which is fine. But then I get a second error saying:

Assertion failed!

Program: C:\Program Files\Mount&Blade\mount&blade.exe
File: e\develop\mb\programs\src\troop.h
Line: 1165

Expression: rgl_between(skill_level,0,(skills[skill_no].max_level + 1))