Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
MadocComadrin said:
Do we get 8? How do you modify them? I can only find the originals from native.
Apparently there's some esoteric way to enable them for different items
Code:
def custom_kill_info(x): # you have to add ico_custom_x (where x is a number between 1 and 7) mesh in order to display it correctly.
  return (((bignum | x) & (itp_kill_info_mask >> itp_kill_info_bits)) << itp_kill_info_bits)

Artyem said:
I've added six new factions to my mod, and it was working fine, but for some reason the king of faction 11 is now a vassal of faction 10.  Does anybody know why this might be happening?  I haven't changed anything that I know of that could do this, and it was working fine earlier.
If you've copy-pasted the ruler troop entries, make sure you haven't left the faction the same as the ones you've copied from.
 
Is it possible to call or jump to an other dialog (scene) out of a dialog?

Code:
[anyone|plyr,"conversation_test",
[(modify_visitors_at_site, "$g_training_ground_melee_training_scene"), # with these
 (set_visitor, 4, "$g_player_minister"), # lines I usually
 (set_jump_mission, "mt_training_ground_trainer_training"), # call a dialog
 (jump_to_scene, "$g_training_ground_melee_training_scene"), # with a chosen npc
 (change_screen_map_conversation, "$g_player_minister"), # from any menu
 ],
"Actually, never mind.", "close_window",[
]],

I was trying to put the stuff I use in menus to have a dialog with someone into the dialog but that won't work.
Can't really figure it out so I wonder if that's even possible what I'm trying to do.

The finished stage was meant to be a dialog where I can wish to speak to my vassals, have the list of them (that's all working), choose one and open a new dialog with him directly. (so I don't need to run after my vassals to talk to them)
 
Melphiz said:
Is it possible to call or jump to an other dialog (scene) out of a dialog?
Code:
<snip>
I was trying to put the stuff I use in menus to have a dialog with someone into the dialog but that won't work.
Can't really figure it out so I wonder if that's even possible what I'm trying to do.
WARNING: Possible lies follow below!
I believe that you can't jump to a different mission whilst the conversation screen is active. Have you tried placing that code in the consequences block? I'm pretty sure it fires after the window closes, so it should do the trick. Alternatively, you may need a mission trigger which check for (neg|conversation_screen_is_active), then set a variable when the player selects the proper option. The conversation window closes, the trigger takes over and jumps to the requested mission. (The second method should definitely work, but I think the first one should as well, and it's definitely a better choice.)
 
Well, when putting it into the consequences block it's no different. The dialog ends and that's it. (Well, the main dialog is called from camp menu with an assigned scene, so I just get back to camp menu after the window closes).

Will have to see how those mission triggers even work, I haven't played around with any triggers apart from implementing existing stuff.

At first I thought about doing the whole selection from within the menu as it's easier to jump to a scene from there. But as the menu is too restricted for having a fine selection of an unknown number of npcs to select from (making a custom export npc menu did make that clear to me) I gave this idea up.

This whole program language is still very foreign to me, I can't get behind its logic in most of the cases.
 
Lumos said:
I found an other way that came into my mind when I went to sleep.
As it is possible to jump to a scene from within a presentation, I now have created a button - when you click on it, the selected Lord is called into this scene.

Unfortunately it doesn't seem I'm able to do this in the Notes > Characters presentation (is that hardcoded?) but as I'm playing Gekokujo mod there's a list of known lords by relation (or so) where you can see all known lords with all information and there I was able to place that button. So I can at least talk to any known lord any time, that's fine for me.
 
Melphiz said:
I found an other way that came into my mind when I went to sleep.
As it is possible to jump to a scene from within a presentation, I now have created a button - when you click on it, the selected Lord is called into this scene.

Unfortunately it doesn't seem I'm able to do this in the Notes > Characters presentation (is that hardcoded?) but as I'm playing Gekokujo mod there's a list of known lords by relation (or so) where you can see all known lords with all information and there I was able to place that button. So I can at least talk to any known lord any time, that's fine for me.
Notes > Characters is not a presentation, it's a hardcoded screen (though you can influence it's contents to a certain degree).

Frenzied_Crocoduck_Herder said:
Does any one know where the vassal family scripts are located?
If you mean setting up vassal families, it's "script_initialize_aristocracy" (really, this question pops up so often that I know this script name by heart already). If it's actual gameplay effects of vassals having families, there's no set script, the effects are scattered throughout the entire module system.
 
vortexofdoom said:
The eventual mod concept would be a Warcraft conversion, so a "mishmash" of everyone would be appropriate in-world.  Obviously that mod is quite a ways off, but I want some basic systems to work before I'd ask for any art help.  Rewriting strings and making the map is where I'm starting, but I'm conceptualizing some deeper gameplay mechanics before I decide where to take the mod.

Warcraft would make an excellent M&B mod.  With some good cat mounts and such you would definitely have something.  Someone made a mod called Surrealarms for regular M&B that had excellent models for orcs and night elves, but it was just a display and the only model used by anyone to my knowledge was a barbarian figure that appears in Prophecy of Pendor.  Worgs, orcs, goblins, dwarves and elves in TLD.  I'll keep an ear out for your mod.  Sounds like something I would love.   
 
argh this issue really gives me a headache now (and I was so happy to have found a working way ...)

So, there is this Reports (menu) > list of known lords by relation (presentation) and now there is this new feature where the selected lord is called from within the presentation to a scene to have a chat.
Pictures of what I talk:
2z6zi9j.jpg

4hzh2h.jpg
The code newly implemented (see # pressed talk_to_npc part)
Code:
(ti_on_presentation_event_state_change,
     [
        (store_trigger_param_1, ":object"), # object
        (store_trigger_param_2, ":value"),  # value

        (try_begin),
            # pressed  (Return to menu)
            (eq, ":object", "$g_jrider_character_report_Return_to_menu"),

            (try_begin),
                (neq, "$num_charinfo_candidates", 0),
                (overlay_set_text, "$g_jrider_character_information_text", "str_empty_string"),
                (overlay_set_alpha, "$g_jrider_last_checked_indicator", 0),
            (try_end),
            (presentation_set_duration, 0),
			
        (else_try),
            # pressed  (talk_to_npc)
            (eq, ":object", "$g_jrider_character_report_talk_to_npc"),

            (try_begin),
                (neq, "$num_charinfo_candidates", 0),
                (overlay_set_text, "$g_jrider_character_information_text", "str_empty_string"),
                (overlay_set_alpha, "$g_jrider_last_checked_indicator", 0),
            (try_end),

			 (modify_visitors_at_site, "$g_training_ground_melee_training_scene"),
			 (set_visitor, 4, "$character_info_id"),
			 (set_jump_mission, "mt_training_ground_trainer_training"),
			 (jump_to_scene, "$g_training_ground_melee_training_scene"),
			 (change_screen_map_conversation, "$character_info_id"),
			 (change_screen_return),

        (else_try),
My typical situation of calling an npc for a talk (like I did with the minister from within a menu). ($character_info_id is the selection from the list with all the npcs information)
But now there is this issue I seem to be unable to understand the program's logic (once again).

I can talk to any lord, no issue, I can ask him about his lord and such stuff but if I am his ruler and tell him to patrol around ... or want to give some troops to him, after finishing the dialog and getting automatically back to the menu (Reports) I am unable to leave it. When I click on "resume travelling" [which is nothing else than (change_screen_return)] it just refreshes the Reports menu.

I tried adding an (presentation_set_duration, 0), before or after and/or placing another (try_begin) aswell, but having that only leads to a closed presentation without getting to the dialog at all.

There's no isse with my minister from a menu (camp), talking to him and having dialogs with other variables (s1 s11 etc.) like assigning fiefs works fine.

So what point am I missing or how could I avoid it, I'm really struggling - it's one of those points where I still don't understand the program and language.

Edit: The dialog's choice itself works, when I ALT+F4 out of the game and load again, the talked lord does what I told him (like patrol around ...).

Edit2: tried to set
Code:
			 (neg|is_presentation_active, "prsnt_jrider_character_relation_report"),
			 (start_presentation, "prsnt_jrider_character_relation_report"),
behind it, just to see what happens.
Well, the presentation gets refreshed before the dialog is called ... why?
After this I was able to do the patrol around dialog and to resume travelling but only once. At a 2nd try in a row I got stuck at the reports menu again.
 
A simple workaround would be quitting the menu when the option is chosen, but not without setting a variable that would decide when to start the presentation in a map trigger to 1. After that, immediately set it back to 0 in the presentation so that you don't get stuck.

PS. Or you can just jump to the reports menu when you've clicked "done".
 
Dusk Voyager said:
A simple workaround would be quitting the menu when the option is chosen, but not without setting a variable that would decide when to start the presentation in a map trigger to 1. After that, immediately set it back to 0 in the presentation so that you don't get stuck.

PS. Or you can just jump to the reports menu when you've clicked "done".
When you click Done, you're already going back to the Reports menu. But you won't be able to click Done when you clicked Talk, as you won't come back to that presentation after the dialog but are already back at the Reports menu (where you get stuck from some subdialogs but not all at all).
So when you click Talk and talk to a chosen lord common stuff like wanting to talk to him in private or so and end the dialog (must beg my leave) you're usually getting back to the reports menu and can leave that or go back to the presentation and talk to another lord.
But when you click Talk and choose dialogs like "I want to give some troops to you" or "I have a new task for you" and you finish the dialog like usual (must beg my leave), you get back to the Reports menu and will be stuck there.

Not sure how to quit the menu after the option is chosen. The used (change_screen_return) could be used in any submenu etc. and will just go back to the parent menu, not the game itself automatically.

But maybe I have to play with triggers (I did never do that yet). I tried to add (presentation_set_duration, 0) at the Reports menu "resume travelling" before (change_screen_return) but that didn't do the trick.
 
When you click Done, you're already going back to the Reports menu. But you won't be able to click Done when you clicked Talk, as you won't come back to that presentation after the dialog but are already back at the Reports menu (where you get stuck from some subdialogs but not all at all).
So when you click Talk and talk to a chosen lord common stuff like wanting to talk to him in private or so and end the dialog (must beg my leave) you're usually getting back to the reports menu and can leave that or go back to the presentation and talk to another lord.
But when you click Talk and choose dialogs like "I want to give some troops to you" or "I have a new task for you" and you finish the dialog like usual (must beg my leave), you get back to the Reports menu and will be stuck there.
No, I meant try using jump_to_menu instead of change_screen_return there.
Not sure how to quit the menu after the option is chosen. The used (change_screen_return) could be used in any submenu etc. and will just go back to the parent menu, not the game itself automatically.
Too many clicks, but you'll have to make do. This one also works fine once you're back on the map.
 
FYI:(change_screen_return) is only(!) used in the Reports menu for Resume Travelling, it is not(!) used in child menus or presentations, there it is always (jump_to_menu, "mnu_reports"),
 
Melphiz said:
FYI:(change_screen_return) is only(!) used in the Reports menu for Resume Travelling, it is not(!) used in child menus or presentations, there it is always (jump_to_menu, "mnu_reports"),
Fair enough, given I don't see the part where you're using the latter in the presentation, and you've never said you had child menus before (one could just replace it with the presentation), I couldn't know you were.

You can try the first method using change_screen_map though.
 
Status
Not open for further replies.
Back
Top Bottom