Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Is it possible to use the number from a global variable in a string?

Code:
         (str_store_string, s1, "$g_give_gold_amount"),
         (str_store_string, s2, "@Pick up {s1} gold."),
         (str_store_string, s0, s2),

When I try that, it gets the number thats stored as the global variable, and gets the corresponding string number and puts it in there, which is not what I want at all.


EDIT: Got it working now thanks anyway.
        (assign, reg1, "$g_give_gold_amount"),
        (str_store_string, s1, "@Pick up {reg1} gold."),
        (str_store_string, s0, s1),
 
(call_script, "script_game_get_money_text", "$g_give_gold_amount"),
(str_store_string, s0, "@Pick up {s1}."),
This is used by the game itself to determine money amount to output (whether the singular or plural form of denar). But since you're using "gold", there's no need to do that.

Also, not sure why you would re-store s2 to s0 - use str_store_string_reg if you want a copy, otherwise just use str_store_string to s0 in the first place.
 
Is there a max number of 'load_mod_resource' you can have in the module.ini? Because I just added number 27 and now WB crashes on start up with a 'Runtime error!'

Any ideas?
 
Yeah I didn't think there would be a max number you could have buts it is strange how it has started crashing after I added number 27. The BRF is all in order and everyting but for some reason WB does not like it.

*Edit* I just combined two of the BRFs to reduce the number of them in the module.ini but it still crashes.....
 
I went through and tested and its not any of the meshes causing the issue.

*Edit* Tested all the mats and textures, they are not causing the crash.
 
Its fine, it loads as normal if i remove the last one.

Im going to put all the meshes and mats from the new BRF into a older BRF and see if that works.
 
Then something is wrong in that BRF.  It's just that simple, I'm afraid.  Make sure that the flags, etc. are all set correctly.  Make sure you're not missing a texture reference.

If that doesn't seem to be the issue, it's possible that some geometry is corrupt, or other issues.
 
Strange, I exported the 30 + horse meshes that where in that brf and imported them into another BRF that only had one thing in it. Imported all the mats, textures and bumps then saved it. Loads up fine now.
 
I'm looking for block of code of inventory into battles(single)... But i can't find it anywere. :oops: May anybody help to me?

How i can hide message of death of player?
 
Unknown said:
I'm looking for block of code of inventory into battles(single)... But i can't find it anywere. :oops: May anybody help to me?
Quick battles? An  inventory is preset in module_troops. Look for quick_battle_troop_#


Unknown said:
How i can hide message of death of player?
(set_show_messages ,0  ),
can suppress all messages. It can be used to hide adeath message when you kill a player from a script.
You may try to invoke it from mission trigger ti_on_agent_killed_or_wounded (or one of subsequent scripts). AFAIK this trigger is activated before a death message. Then you should turn the message state to show in an instant trigger somewhat like
      (0, 0, 0, [(eq,'$g_message_is_turned_off',1)],  [(set_show_messages ,1  ),(assign,'$g_message_is_turned_off',0)]
 
After a number of searches, reading threads, playing with and looking through the code, I must admit my understanding of the distinctions among type/group/class/division/team and between agent/troop are fuzzy at best. A precise explanation of the differences and what they imply would help my thinking greatly--and unless I'm blind, be a useful addition to some sort of FAQ or an easily accessible further explanation of header_operations...

So, what is the difference between an agent and a troop in mission_templates and scripts (i.e. why the need to switch between them for various operations)?

And, what is the difference among troop and agent _type, _group, _class, _division, and _team ?

These questions are similar to hatonastick's in this thread and I would have posted there if it weren't locked.
 
A troop is an actual class or template to create a unit/agent from. An agent is the physical character walking around in a scene.

So if you have a scene with two Swadian Footmen in, then they both share the same troop, but they are different agents.

The other parts I imagine refer to the way in which agents are split up and given orders though I don't know the exact difference between each one.
 
Status
Not open for further replies.
Back
Top Bottom