Author Topic: Ask Winter  (Read 65279 times)

Oroonin

  • Guest
Re: Ask Winter
« Reply #135 on: July 06, 2009, 04:55:41 AM »

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 #136 on: July 06, 2009, 11:25:16 AM »

ERROR: NEED MORE GODDAMN INPUT.

And a screenshot.

Regards,
Winter

Oroonin

  • Guest
Re: Ask Winter
« Reply #137 on: July 07, 2009, 01:30:59 PM »
Problem solved. Appearantly, if the brf-edit saves brfs to module.ini, the end of the file screws up.

Offline Brutus

  • Master
  • *****
  • Posts: 1973
    • View Profile
Re: Ask Winter
« Reply #138 on: August 30, 2009, 11:27:07 PM »
« Last Edit: August 31, 2009, 11:10:52 PM by Brutus »

Offline Brutus

  • Master
  • *****
  • Posts: 1973
    • View Profile
Re: Ask Winter
« Reply #139 on: August 31, 2009, 07:55:41 PM »
***Double Post*** :D

Will trade custom models and UV mapping for basic dialog code direction.  PM me if interested.  

Some new TLD warg examples.  


Dominance War III entry



HL2 Mod piratechar


All models created from scratch...

PLEASE help the noob coder...  Will do art for script lessons.



  

« Last Edit: August 31, 2009, 11:05:22 PM by Brutus »

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 #140 on: September 01, 2009, 03:45:56 AM »
[trp_antler, "start", [[eq,"$holy_relic",0]], "Hello, fetch the relic from Har in Praven", "antler",[]],
[trp_antler|plyr, "antler1", [], "Ok.", "antler2",[]],
[trp_antler, "antler2", [], "Please hurry!", "antler3",[]],
[trp_antler|plyr, "antler3", [], "I will.", "antleryes",[
      (setup_quest_text, "qst_relic"),
      (str_store_string, s2, "@Get relic from Har in Praven and return it to Antler."),
      (call_script,"script_start_quest","qst_relic","trp_antler"), (call_script, "add_troop_item", "trp_player", "itm_relic"), "close_window",[]], -- Here you've put an operation outside of an operations block. That's never gonna work.

[trp_har, "start", [[]], "Greetings {playername}.","har_bye",[]],
[trp_har|plyr, "har_bye", [], "Greetings to you too, Antler.","close_window",[]],

Regards,
Winter

Offline Brutus

  • Master
  • *****
  • Posts: 1973
    • View Profile
Re: Ask Winter
« Reply #141 on: September 01, 2009, 10:20:01 AM »
Ah yes.  And many other nooby issues...  THANKS!!!  Stuck on two last items - even copied the format from working code in same module???

[trp_antler, "start", [[eq,"$holy_relic",0]], "Hello. Please fetch the relic from Har in Praven.", "antler1",[]],
[trp_antler|plyr, "antler1", [], "Ok.", "antleryes",[
      (setup_quest_text, "qst_relic"),
     (str_store_string, s2, "@Get relic from Har in Praven and return it to Antler in Suno."),
      (call_script,"script_start_quest","qst_relic","trp_antler")]],
[trp_antler|plyr, "antler1", [], "No, I don't have time for that.", "close_window",[]],
[trp_antler, "antleryes", [], "Excellent!", "close_window",[[assign,"$holy_relic",1]]],

[trp_antler, "start", [[eq,"$holy_relic",1]], "Did you find the relic?","got_relic_question",[]],
[trp_antler|plyr, "got_relic_question",[(player_has_item,"itm_relic")], "Yes, here it is!", "relic_got",[
      (call_script, "script_end_quest", "qst_relic")]],
[trp_antler|plyr, "got_relic_question",[],"No, not yet.", "close_window",[]],
[trp_antler, "relic_got",[],"Excellent! Here is your reward.", "close_window",[
      (call_script, "script_troop_add_gold", "trp_player", 2000),
     ("troop_remove_items","trp_player","itm_relic"),
     (call_script, "end_quest_qst_relic")]],


[trp_har, "start", [(check_quest_active, "qst_relic")],"Greetings. Are you here for the relic?.","har_1",[]],
[trp_har|plyr,"har_1",[], "Yes.  Please give me the relic.", "har_2",[]],
[trp_har, "har_2",[],"Yes, yes!  Take it!.","close_window",[
      ("troop_add_items", "trp_player", "itm_relic", 1)]],


...
Error in dialog line:
[603, 'relic_got', [], 'Excellent! Here is your reward.', 'close_window', [(1, 'script_troop_add_gold', 'trp_player', 2000), ('troop_remove_items', 'trp_player'
, 'itm_relic'), (1, 'end_quest_qst_relic')]]

Error in dialog line:
[604, 'har_2', [], 'Yes, yes!  Take it!.', 'close_window', [('troop_add_items',
'trp_player', 'itm_relic', 1)]]
Checking global variable usages...
...

Winter, if you are still working Storymod and need some art just send a sketch. :D

geeves

  • Guest
Re: Ask Winter
« Reply #142 on: October 01, 2009, 11:49:39 AM »
hey winter,
I've got a question for you, well actually 2 or more questions.

To start off, i am happy to say that your module explanations on the taleworlds website forums are pretty well worked out, i learned a lot of them.
until i get to the point where i wish see my created troops in game, following your steps i should be able to see my troops in game on the specified location...
to start off: with the Module system 1010_0, Zendar mercs do not exist. i didn't see a point in that, i just copied your script from the website and put it in place, just under the line telling me that zendar as city is inactive. i put zendar as active city and saved the lot. no errors. run the game, find zendar, see a grand total of ... 3 NPCs, clearly it has to be customised. (in game editor ain't popping up BTW, but i could copy my face code earlier on.) i go to the inn, find 3 hero's which i didn't want there, but OK, i found out they are scripted into that place when Zendar is set as active city. No tavernkeeper to be found by the way, neither are the mercs i wanted to put in game.

there we go, Question one: how do we solve this?
I've already tried giving the mercs a hero line without the TF_HERO mark. not working. gets you a nice error.

that covered. how can we get Zendar a working city? merchants ect added, a game menu of the kind you get when for example you enter Thir. for that's where we get question two:
why wasn't your module explanations finished? i find part 10 where in game editing is covered incomplete, as are to my noob idea more of the covered but completed" arts of the module explanations.

another question arising is: how can i get a village in the game where i can get my own troops as recruits like i can get swadian recruits in swadian towns?
for the moment this will cover enough things to get me going after the time being.

(PS game info: module system 1010_0, game version 1.011)
« Last Edit: October 01, 2009, 12:02:47 PM by geeves »

Offline Shik

  • Craftsman
  • **
  • Posts: 88
    • View Profile
Re: Ask Winter
« Reply #143 on: October 04, 2009, 12:00:18 PM »
[trp_antler, "relic_got",[],"Excellent! Here is your reward.", "close_window",[
      (call_script, "script_troop_add_gold", "trp_player", 2000),
     ("troop_remove_items","trp_player","itm_relic"),
     (call_script, "end_quest_qst_relic")]],


[trp_har, "start", [(check_quest_active, "qst_relic")],"Greetings. Are you here for the relic?.","har_1",[]],
[trp_har|plyr,"har_1",[], "Yes.  Please give me the relic.", "har_2",[]],
[trp_har, "har_2",[],"Yes, yes!  Take it!.","close_window",[
      ("troop_add_items", "trp_player", "itm_relic", 1)]],


Brutus, if you haven't already fixed this issue by yourself, just remove the quotation marks around the operation troop_add_items.

Offline Brutus

  • Master
  • *****
  • Posts: 1973
    • View Profile
Re: Ask Winter
« Reply #144 on: October 04, 2009, 06:50:58 PM »
Thanks!!!  I found some other issues in there after that was straight too.  oi...  But those were showstoppers, rest I got.   

Need a model? :D  If so just PM. 

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 #145 on: October 04, 2009, 07:39:45 PM »
hey winter,
I've got a question for you, well actually 2 or more questions.

To start off, i am happy to say that your module explanations on the taleworlds website forums are pretty well worked out, i learned a lot of them.
until i get to the point where i wish see my created troops in game, following your steps i should be able to see my troops in game on the specified location...
to start off: with the Module system 1010_0, Zendar mercs do not exist. i didn't see a point in that, i just copied your script from the website and put it in place, just under the line telling me that zendar as city is inactive. i put zendar as active city and saved the lot. no errors. run the game, find zendar, see a grand total of ... 3 NPCs, clearly it has to be customised. (in game editor ain't popping up BTW, but i could copy my face code earlier on.) i go to the inn, find 3 hero's which i didn't want there, but OK, i found out they are scripted into that place when Zendar is set as active city. No tavernkeeper to be found by the way, neither are the mercs i wanted to put in game.

there we go, Question one: how do we solve this?
I've already tried giving the mercs a hero line without the TF_HERO mark. not working. gets you a nice error.

that covered. how can we get Zendar a working city? merchants ect added, a game menu of the kind you get when for example you enter Thir. for that's where we get question two:
why wasn't your module explanations finished? i find part 10 where in game editing is covered incomplete, as are to my noob idea more of the covered but completed" arts of the module explanations.

another question arising is: how can i get a village in the game where i can get my own troops as recruits like i can get swadian recruits in swadian towns?
for the moment this will cover enough things to get me going after the time being.

(PS game info: module system 1010_0, game version 1.011)

There's no real point trying to make my tutorials work for the current version of M&B, there's way too much distance between the two. If you really want to bypass the native systems and create a functioning town, make a special game menu for Zendar and use that instead of mnu_town. That's about as much advice I can give without writing additional tutorials, and I'm not doing that without a paycheque. :P

Regards,
Winter

motomataru

  • Guest
Re: Ask Winter
« Reply #146 on: February 01, 2010, 10:49:53 AM »
I've come to the conclusion after 3-4 days of examining the issue that team_get_order_position is badly behaved compared to, say, agent_get_position. It's like, position_move_x completely shuts down on the acquired position. script_update_order_flags_on_map from the module system uses script_convert_3d_pos_to_map_pos on positions acquired by team_get_order_position, but I think it's specifically for building some sort of order map and moreover didn't work at all for me. I ended up with the following kluge, apologies to agent 0 whoever he or she may be, which fixed the problem:

Code: [Select]
  # script_get_formation_position
  # Input: team, troop class
  # Output: pos1 (pos0 used)
  # Kluge around team_get_order_position shutting down position_move_x
  # without resorting to looping through agents yet again
  ("get_formation_position",
   [(store_script_param, ":fteam", 1),
    (store_script_param, ":fclass", 2),
(agent_get_position, pos0, 0),
(team_get_order_position, pos1, ":fteam", ":fclass"),
(agent_set_position, 0, pos1),
(agent_get_position, pos1, 0),
(agent_set_position, 0, pos0),
]),

Question is, am I missing something basic about using team_get_order_position?

Offline ithilienranger

  • Apprentice
  • *
  • Posts: 11
    • View Profile
Re: Ask Winter
« Reply #147 on: September 04, 2010, 08:18:00 PM »
I have an extremely annoying problem with a modification that I am working on. It seems to be an error with the "troop_get_upgrade_troop" operation. I am trying to use the 1st and 2nd nodes of that operation, but I do not get the proper return values. The string register is not given the correct value. I have tried outputting the register values at different key points in the game and I added new registers to avoid conflicts. All I can figure out is that it likes to store the 2nd node troop for the first node and then the first node is stored as my player name. If there is one node choice then I get the player name for both menu choices.

Here is the code that I narrowed the problem down to.


#excerpt from a script
(try_begin),
         (eq, "$commander's_faction", fac_kingdom_1),
         (assign, "$player_cur_troop", "trp_swadian_recruit"),
      (else_try),
         (eq, "$commander's_faction", fac_kingdom_2),
         (assign, "$player_cur_troop", "trp_vaegir_recruit"),
      (else_try),
         (eq, "$commander's_faction", fac_kingdom_3),
         (assign, "$player_cur_troop", "trp_khergit_tribesman"),
      (else_try),
         (eq, "$commander's_faction", fac_kingdom_4),
         (assign, "$player_cur_troop", "trp_nord_recruit"),
      (else_try),
         (eq, "$commander's_faction", fac_kingdom_5),
         (assign, "$player_cur_troop", "trp_rhodok_tribesman"),
      (try_end),


#menu_upgrade_path
  (
    "upgrade_path",0,
    "In recognition of your excellent service, you have been promoted.",
    "none",
    [
   (troop_get_upgrade_troop, "$path_1", "$player_cur_troop", 1),
   (troop_get_upgrade_troop, "$path_2", "$player_cur_troop", 2),
   #string register to output troop name
   (str_store_troop_name, s66, "$path_1"),
   (str_store_troop_name, s67, "$path_2"),
   ],
    [
      ("upgrade_path_1",[(neq, "$path_1", -1)],
       "{s66}",
        [
         (assign, "$menu_upgrade_path_response", "$path_1"),
         (call_script, "script_cf_event_player_promotion", "$menu_upgrade_path_response"),
         (change_screen_map),
        ]),
      
      ("upgrade_path_2",[(neq, "$path_2", -1)],
      "{s67}",
        [
         (assign, "$menu_upgrade_path_response", "$path_2"),
         (call_script, "script_cf_event_player_promotion", "$menu_upgrade_path_response"),
         (change_screen_map),
        ]),
    ]
  ),






Offline GetAssista

  • Master
  • *****
  • Posts: 1357
  • TLD Dev team
    • View Profile
Re: Ask Winter
« Reply #148 on: September 05, 2010, 04:47:30 AM »
Try put some constant troop instead of "$player_cur_troop" variable into a menu part and see what happens. If menu choices are correct then it would mean you are messing up with this variable somewhere else

Also, you are not checking for -1 in paths when doing (str_store_troop_name, s67, "$path_2"). Might throw it off somehow

Offline ithilienranger

  • Apprentice
  • *
  • Posts: 11
    • View Profile
Re: Ask Winter
« Reply #149 on: September 05, 2010, 05:52:42 AM »
I tried using the built in temp troop and it did the same thing for me. I'll try that check for -1 for the string registers, but I think I already tried it.

EDIT: I did the -1 check before assigning the string registers. but something else is causing the problem. Also, I have checked several times using the Notepad++ find in files and none of my uses should mess with the variable.
« Last Edit: September 05, 2010, 06:27:54 AM by ithilienranger »