Dungeon help

Users who are viewing this thread

Meneldur

Sergeant Knight
need to know how to spawn hostile units(undeads) in scene. No battle or siege

i managed new scene and new chests in it but to make it intresting i need hell knihgts inscene

in jik´s tut it is quest-related please give me a hint
 
i know this is the worst behaviour to post but i tried everything to get that working


i tried this:

("enter",[],"Enter.",[(set_jump_mission,"mt_bandits_at _night"),(jump_to_scene,"scn_random_scene_desert_forest") without success. noone spawned in given scene

With a new mission temp I guess it could be done but i have no idea what defines the spawn in:
mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed

but hell i tried the whole sunday without finding the spawn thingy
 
I would be interested in knowing how this can be done as well.  Apparently it's not easy because so few people have done it - but some folk have definitely done it.  I don;t know if the source code for A Medieval dventure was ever released Meneldur, but in that there were enemies in scenes who you spoke to - and that initiated combat within the same scene.  It's a shame no one has taken it any further.

BTW, have you tried using a village or town scene instead of "random_scene_desert."  I'm not sure if it would make any difference, but it might be worth a try.

I'm going to have to read Jik's tutorial more closely, especially on this subject.  If anything clicks in my brain I'll let you know.
 
I think you need to use add_troop_to_scene (not sure if that's the exact command but it's definitely in header_operations.)
You define the troop, the entry point and all that jazz.

What might not be possible is to have the troop just appear. I think it is necessary for the scene to reload in order for the troop to be displayed.

A simple way around that is to have a game menu appear and then you re-enter the scene. Of course, you'd need a new entry point but that could easily be handled. It may also be possible to move the player's entry point to where he's standing when he exits. I don;t know if this last bit is possible (you can move objects in scenes because the bloody siege towers move) but if it was then you could ensure that you were in the same place when the scene reloaded as you were before it spawne

All this comes from messing about with the commands in the module system. I suggest playing with it for a while and seeing if you can solve this using any of the above.

Hope that helps. And do post when you find a solution- I think this could help a lot of people.

 
Oh, and it's real easy to make npcs that you talk to initiate combat, because I;ve done it for my learning mod.
See below.

Go into module_dialogs and search for "fit his description."

This will take you to the section of code that concerns our friend the nervous man

If you look at what happens when he does his whole " I hate you" and attacks, the code changes his team to 1 and initiates party battle mode. Basically copy the relevant chunk to the operations block of the dialogue YOU want to use, and change any trp_fugitives to trp_whatevers.

Voila! When the bastard finishes talking, he will go for you, and you can kill him with impunity. Excellent

P.S. don;t know if this was relevent but since flanged raised it I thought I;d put it in here. It might be fun for any boss battle's you want to put in. You could have a boss scene attacthed to your dungeon withn a passageway, and a trigger to force dialogue when you entered the room. (Make sure that starting dialogue state is event_triggered if you do. I'm not being patronising- this has bitten me in the arse more times than I can count.) Dialogue ends after some classic trash-talk banter, duiel begins. Just a thought
 
I haven't looked at this yet myself, but the game engine does it for the reinforcements.  Come to think of it, the melee arena battle does it, you should take a look at the mission template for that mission.  Every so often, (if there are fewer than a set number) a new challenger is spawned at one of the entry points.  I would think this would be exactly what you are looking for.  If you find it, let us (the community) know.
 
Thank you all for reply here is my list of things which do not work :???:

1)The village scene thingy does not change anything

2)double the mt:
"sneak_caught_fight"  into "caught_fight"  kills the whole scene somehow test scene and similar wierd things

3)double mt

"besiege_inner_castle_battle" into "inner_castle_battle" change scene into castle scene wtihin game menus
asswell edited mt´s in gm py:            the whole scene works within the mt strings: "battle won press tab key"

4) simply change jump to mission mt_bandits_at_night gave mission conditions like "can´t leave now" appear, but no spawns

About your hint´s:
Found header op. add_troop_ to_site                    looks promising

do i have to make a script out of that???  or in which module.py should i add/define:

(add_troop_to_site,<trp_hell_knight>,<scn_camp_scene>,<entry_3>),    and if this work someday how can i make troop attack the player/ start alarmed??

with the nervous men and medieval adventure main problem is that required dialog because this may enable gamer
to loot my wonderfull chests without any conflict somehow. for what one may call me a lazy dungeon keeper :???:

the  melee arena battle clone with set visitor hell knight i´ll try tomorrow.

Thanks for all I really appreciate every hint one can give!!!!


 
the add_troop_to_site is more for having NPCs in a scene that you enter, not for spawning.  Like it was said, you would have to leave the scene and come back to see them.  This can work (as suggested) with a menu, but you would then have to add an entry point where the player was (and all others) when the menu screen comes up, so you can put them back in the same spot that they were in before leaving.

I still think the best bet is to look at the melee template, triggers and scripts.
 
the mt is:
(
    "arena_melee_fight",mtf_arena_fight,-1,
    "You enter a melee fight in the arena.",
    [
      (0,mtef_visitor_source|mtef_team_0,af_override_all,aif_start_alarmed,1,[itm_practice_bow,itm_practice_arrows,itm_practice_horse,itm_arena_tunic_red, itm_red_tourney_helmet]),....................................
     
and my homies and the enemies but no "set_visitors" or"try_for_agents" in that mt are defined asswell all spawn stuff isaw seemed to be tournament related. By the way do i have the right mt here??? what the hell that listed equipment is also for tournaments.

Also the triggers above i cant identify whats tournament and what is arena.
So i´ll try this is the arena fight?:
##tournament triggers above??

(0, 0, ti_once, [], [(eq, "$g_mt_mode", abm_training),(start_presentation, "prsnt_arena_training")]),
  (0, 0, ti_once, [], [(eq, "$g_mt_mode", abm_training),
                       (assign, "$g_arena_training_max_opponents", 40),## yes it seems to be right
                       (assign, "$g_arena_training_num_agents_spawned", 0),
                       (assign, "$g_arena_training_kills", 0),
                       (assign, "$g_arena_training_won", 0),
                       (call_script, "script_music_set_situation_with_culture", mtf_sit_arena),
                       ]),

  (1, 4, ti_once, [(eq, "$g_mt_mode", abm_training),
                   (store_mission_timer_a, ":cur_time"),
                   (gt, ":cur_time", 3),
                   (assign, ":win_cond", 0),
                   (try_begin),
                     (ge, "$g_arena_training_num_agents_spawned", "$g_arena_training_max_opponents"),#spawn at most 40 agents
                     (num_active_teams_le, 1),
                     (assign, ":win_cond", 1),
                   (try_end),
                   (this_or_next|eq, ":win_cond", 1),
                   (main_hero_fallen)],
   [
       (get_player_agent_no, ":player_agent"),
       (agent_get_kill_count, "$g_arena_training_kills", ":player_agent", 1),#use this for conversation
       (assign, "$g_arena_training_won", 0),
       (try_begin),
         (neg|main_hero_fallen),
         (assign, "$g_arena_training_won", 1),#use this for conversation
       (try_end),
       (assign, "$g_mt_mode", abm_visit),
       (set_jump_mission, "mt_arena_melee_fight"),
       (party_get_slot, ":arena_scene", "$current_town", slot_town_arena),
       (modify_visitors_at_site, ":arena_scene"),
       (reset_visitors),
       (set_visitor, 35, "trp_veteran_fighter"),
       (set_visitor, 36, "trp_hired_blade"),
       (set_jump_entry, 50),
       (jump_to_scene, ":arena_scene"),
       ]),


  (0.2, 0, 0,
   [
       (eq, "$g_mt_mode", abm_training),
       (assign, ":num_active_fighters", 0),
       (try_for_agents, ":agent_no"),
         (agent_is_human, ":agent_no"),
         (agent_is_alive, ":agent_no"),
         (agent_get_team, ":team_no", ":agent_no"),
         (is_between, ":team_no", 0 ,7),
         (val_add, ":num_active_fighters", 1),
       (try_end),
       (lt, ":num_active_fighters", 7),
       (neg|main_hero_fallen),
       (store_mission_timer_a, ":cur_time"),
       (this_or_next|ge, ":cur_time", "$g_arena_training_next_spawn_time"),
       (this_or_next|lt, "$g_arena_training_num_agents_spawned", 6),
       (num_active_teams_le, 1),
       (lt, "$g_arena_training_num_agents_spawned", "$g_arena_training_max_opponents"),
      ],
    [
       (assign, ":added_troop", "$g_arena_training_num_agents_spawned"),
       (store_div,  ":added_troop", "$g_arena_training_num_agents_spawned", 6),
       (assign, ":added_troop_sequence", "$g_arena_training_num_agents_spawned"),
       (val_mod, ":added_troop_sequence", 6),
       (val_add, ":added_troop", ":added_troop_sequence"),
       (val_min, ":added_troop", 9),
       (val_add, ":added_troop", "trp_arena_training_fighter_1"),
       (assign, ":end_cond", 10000),
       (get_player_agent_no, ":player_agent"),
       (agent_get_position, pos5, ":player_agent"),
       (try_for_range, ":unused", 0, ":end_cond"),
         (store_random_in_range, ":random_entry_point", 32, 40),
         (neq, ":random_entry_point", "$g_player_entry_point"), # make sure we don't overwrite player
         (entry_point_get_position, pos1, ":random_entry_point"),
         (get_distance_between_positions, ":dist", pos5, pos1),
         (gt, ":dist", 1200), #must be at least 12 meters away from the player
         (assign, ":end_cond", 0),
       (try_end),
       (add_visitors_to_current_scene, ":random_entry_point", ":added_troop", 1),
       (store_add, ":new_spawned_count", "$g_arena_training_num_agents_spawned", 1),
       (store_mission_timer_a, ":cur_time"),
       (store_add, "$g_arena_training_next_spawn_time", ":cur_time", 14),
       (store_div, ":time_reduction", ":new_spawned_count", 3),
       (val_sub, "$g_arena_training_next_spawn_time", ":time_reduction"),
       ]),

  (0, 0, 0,
   [
       (eq, "$g_mt_mode", abm_training)
       ],
    [
       (assign, ":max_teams", 6),
       (val_max, ":max_teams", 1),
       (get_player_agent_no, ":player_agent"),
       (try_for_agents, ":agent_no"),
         (agent_is_human, ":agent_no"),
         (agent_is_alive, ":agent_no"),
         (agent_slot_eq, ":agent_no", slot_agent_arena_team_set, 0),
         (agent_get_team, ":team_no", ":agent_no"),
         (is_between, ":team_no", 0 ,7),
         (try_begin),
           (eq, ":agent_no", ":player_agent"),
           (agent_set_team, ":agent_no", 6), #player is always team 6.
         (else_try),
           (store_random_in_range, ":selected_team", 0, ":max_teams"),
          # find strongest team
           (try_for_range, ":t", 0, 6),
             (troop_set_slot, "trp_temp_array_a", ":t", 0),
           (try_end),
           (try_for_agents, ":eek:ther_agent_no"),
             (agent_is_human, ":eek:ther_agent_no"),
             (agent_is_alive, ":eek:ther_agent_no"),
             (neq, ":agent_no", ":player_agent"),
             (agent_slot_eq, ":eek:ther_agent_no", slot_agent_arena_team_set, 1),
             (agent_get_team, ":eek:ther_agent_team", ":eek:ther_agent_no"),
             (troop_get_slot, ":count", "trp_temp_array_a", ":eek:ther_agent_team"),
             (val_add, ":count", 1),
             (troop_set_slot, "trp_temp_array_a", ":eek:ther_agent_team", ":count"),
           (try_end),
           (assign, ":strongest_team", 0),
           (troop_get_slot, ":strongest_team_count", "trp_temp_array_a", 0),
           (try_for_range, ":t", 1, 6),
             (troop_slot_ge, "trp_temp_array_a", ":t", ":strongest_team_count"),
             (troop_get_slot, ":strongest_team_count", "trp_temp_array_a", ":t"),
             (assign, ":strongest_team", ":t"),
           (try_end),
           (store_random_in_range, ":rand", 5, 100),
           (try_begin),
             (lt, ":rand", "$g_arena_training_num_agents_spawned"),
             (assign, ":selected_team", ":strongest_team"),
           (try_end),
           (agent_set_team, ":agent_no", ":selected_team"),
         (try_end),
         (agent_set_slot, ":agent_no", slot_agent_arena_team_set, 1),
         (try_begin),
           (neq, ":agent_no", ":player_agent"),
           (val_add, "$g_arena_training_num_agents_spawned", 1),
         (try_end),
       (try_end),
       ]),
  ]
and if so i need to find or delete all try for agents and slot stuff and use only the set_visitor veteran fighter, hired blade which are defined directly here.
if so???? :sad: will i ever get that work??

i found a topic from keedo420
where they seem to have managed to make a random encounter:

("random_encounter_bandits",
[(get_player_agent_no,":player_agent"),
(agent_get_position,pos1,":player_agent"),
(entry_point_get_position, pos2, 10),
(get_distance_between_positions,":temp_distance",pos1,pos2),
(lt, ":temp_distance", 200),
(set_spawn_position, pos1),        
(spawn_agent,"trp_looter"),
]),
by wickedshot
http://forums.taleworlds.com/index.php/topic,54681.msg1414849.html#msg1414849


tried that as an mt failed again. What module does that belong to? scripts mt i´m really confused now

what must i change also to make that possible??

!!!!! What about an mt: lonley_besiege_town/castle    just a siege_scene where the allied mtef_visitor_source´s are deleted in??

this might be easier?




 
I'm confused...  you have the trigger listed there:

  (0.2, 0, 0,
  [
      (eq, "$g_mt_mode", abm_training),
      (assign, ":num_active_fighters", 0),
      (try_for_agents, ":agent_no"),
        (agent_is_human, ":agent_no"),
        (agent_is_alive, ":agent_no"),
        (agent_get_team, ":team_no", ":agent_no"),
        (is_between, ":team_no", 0 ,7),
        (val_add, ":num_active_fighters", 1),
      (try_end),
      (lt, ":num_active_fighters", 7),
      (neg|main_hero_fallen),
      (store_mission_timer_a, ":cur_time"),
      (this_or_next|ge, ":cur_time", "$g_arena_training_next_spawn_time"),
      (this_or_next|lt, "$g_arena_training_num_agents_spawned", 6),
      (num_active_teams_le, 1),
      (lt, "$g_arena_training_num_agents_spawned", "$g_arena_training_max_opponents"),
      ],
    [
      (assign, ":added_troop", "$g_arena_training_num_agents_spawned"),
      (store_div,  ":added_troop", "$g_arena_training_num_agents_spawned", 6),
      (assign, ":added_troop_sequence", "$g_arena_training_num_agents_spawned"),
      (val_mod, ":added_troop_sequence", 6),
      (val_add, ":added_troop", ":added_troop_sequence"),
      (val_min, ":added_troop", 9),
      (val_add, ":added_troop", "trp_arena_training_fighter_1"),
      (assign, ":end_cond", 10000),
      (get_player_agent_no, ":player_agent"),
      (agent_get_position, pos5, ":player_agent"),
      (try_for_range, ":unused", 0, ":end_cond"),
        (store_random_in_range, ":random_entry_point", 32, 40),
        (neq, ":random_entry_point", "$g_player_entry_point"), # make sure we don't overwrite player
        (entry_point_get_position, pos1, ":random_entry_point"),
        (get_distance_between_positions, ":dist", pos5, pos1),
        (gt, ":dist", 1200), #must be at least 12 meters away from the player
        (assign, ":end_cond", 0),
      (try_end),
      (add_visitors_to_current_scene, ":random_entry_point", ":added_troop", 1),
      (store_add, ":new_spawned_count", "$g_arena_training_num_agents_spawned", 1),
      (store_mission_timer_a, ":cur_time"),
      (store_add, "$g_arena_training_next_spawn_time", ":cur_time", 14),
      (store_div, ":time_reduction", ":new_spawned_count", 3),
      (val_sub, "$g_arena_training_next_spawn_time", ":time_reduction"),
      ]),

The line bolded near the end is what you want to use.  The rest is all set up, but if you are adding zombies, just put in the zombie troop ID where it has ":added_troop".  You should be able to get the rest.
 
Spawn succeded!

It´s far away from being a clean and precise code. That causes in my incapability to deal with mt´s.

added wickedshot´s script random encounter bandits to the module scripts and  copied an mt-clone from bandits at night.
The ti once trigger wickedshot posted within.      look at the link in my last post!
Add mt_ to the to the game menus 

So far this will kick you out of the scene without any spawns

Had to change the script random encounter bandits and took out the distance required for the spawn.  Now it seems i can create unlimited spawns by editing the script entries and pos.

So far this will kick you out of the scene after all enemies are killed.

Not kind of great stuff; the leave encounter text is the default one Who belongs to ambushes.
I´ll come back and post full code´s of what i´ve done later. 
 
Good stuff.  So you could have random spawns from different places in a scene, and have the Nervous Man there as well as a kind of boss?  Ie. You kill all the randoms to get to the Nervous Man, then he does some villain chat ("We are the same, you and I," or some such pish) and then you kill him as well. 

I'm going to try adding a wee adventure quest to my mod.
 
Yeah that's the general idea. I'm sorting one out in my learning mod...

It's also possible to give him a couple of henchmen that trigger off when he triggers off. In other words, you get him AND his goons attacking together. Or whatever. I think you can tigger defeat dialogue (though you may need a game menu in between) simply by using add_troop_to_site in the conversation scene, but I;m not sure. That way you can have the whole defeat cliche as well, you know all the stuff that follows on from 'We are much the same you and I.' e.g. 'Killing me won't change anything. You cannot stand in the way of progress. Others will take my place.. blah blah blah.
Then you just dump yourself back in the scene (or not) and have a chest standing there with your reward. Or whatever.

In any case, the nervous man script rocks.
 
Aye, he's not the Nervous Man anymore.  He's now the Lord of Doom or The Big Guy of Darkness or whatever!.  A lot of people will be able to work wonders with this stuff.
 
"So you could have random spawns from different places in a scene,..."

wickedshots script seem to make it possible; thats good stuff.
Im not sure about the random thingy maybe the script says that but in my tests every trp_ spawns very exact at the given entry_pnts.

"Then you just dump yourself back in the scene (or not) and have a chest standing there with your reward. Or whatever. ..."
in the mt_ i made i deleted simply the change banners and chests trigger. And placed the chest so that the player has to fight much before can get his hands on it. don´t know if this is better?

about dialogs i know exactly how to implement kolbas tutorial_quest - and thats all. So i´ve no idea what possible with boss fights
At first ill duplicate my scene´s add somekind of that spawn scripts and edit them, then trying to get perma death in it.

dialogs quests and stuff would be great of cause!! 
 
Meneldur said:
about dialogs i know exactly how to implement kolbas tutorial_quest - and thats all.

Well, you're one step ahead of me on that.  But at least we know how it's done now, if not actually exactly how to do it.
 
If so i´ll have another idea. its from Gothic 2 where enemies called searchers talk to the player about doom and bla bla and attack him then.
Well the default duel lord conversation seem to appear from a party encounter.

-A troop lets call him assasin could spawn as any other party on campaign map but only one member within and be very fast and strong in duels of course.

-Belonging to a new minor faction (whats easy to do) which is only at negative relation to the gamer and no other.

-and the encounter give conversation which enforces duel

A high specialized player killer :arrow:   as a variation of the kolba quest or an event triggerd thing this would feel awsome i think.  To bad about event trigger i know they exist somewhere somehow.

Btw: i may try to override horses for all duels this horse haking thing seem horrible to me    
 
From what you;ve said...

Check Jik's tutorial. (It's in my sig)

A lot of it may seem beneath you but working through it really helps. And the example is actually the makings of a party that attacks you and then sends you to a duel with one really strong npc (the leader). So it is basically a step by step guide on how to do what you just asked.

It also explain's dialogue really well, and once you;ve worked through the dialogue jobber you'll never have a problem with it again. I can;t really recommend this enough.
 
The dialogue thing on campaign map will make no problems, as you said its in jik´s tut and in kolba´s to.
But without tried it till now I anticipate a problem with this one man party´s courageness. If that behaves on map like a default party this assasins AI will recognise its inferiotity in numbers-only one- and flee the player. :mad: ?????

I may find the fugitive man and make npc´s hostile after dialoge to.

1)But i did not find something to enforce dialoge by scene encounter.???????

Except the event_triggered in modul dialoges py.  but i´ve no idea to get that work. And i need to know if a module quests is needed for every kind of that.??????

I´m ready with the dungeon spawns and posted that in a topic from Jik:

http://forums.taleworlds.com/index.php/topic,63047.msg1637179.html#msg1637179

if wanted i could make a detailed description of that. Its not perfect but it gives spawns and some options of variety i found

If i could get Damocles patience for that enforce dialouge and stuff would be great!!
 
Ok....

"event_triggered" is the starting dialogue state you use if the dialogue is initiated by a trigger. You don't need it here as far as I know.

From what I understand, you want an assassin party with very low numbers to attack, on the world map. To do this, create the party template in "module_party_templates" but don;t use a preset personality. Soldiers and bandits will avoid you if you outnumber them. Set the aggressiveness of the party to something tres high and then add the attack player aif flag. (I can't remember this off the top of my head, but it's in the tutorial. Basically, if you've got this flag, the party will run all the way across the map from the moment it is spawned to attack you. Unless you are too powerful, in which case it will run away, but that's why you need to mess about with the personality.) Oh, and make sure the party faction has a negative relation with the player.

Right, sorting the dialogue is like this. Add an npc who is your assassin whatever, and give him specific dialogue. Make sure you add it above the ###Companions bit. You don't need the nervous man script- that makes someone become hostile in a scene after talking to them, and this guy is already hostile because his party is hostile. Just use the normal "start" at the beginning and set it up however you want. Now, when you run into him, you should have the conversation before jumping to the encounter. Whenever you encounter this guy, you'll have the same dialogue followed by the encounter, but if you create him without the tf_hero flag in his troop tuple, he'll disappear once you defeat his party (you can then contorl the appearence of the assassin by whatever trigger you use to spawn his party.)

If you want the actual encounter to be different from a battle, then you need to muck about with mission templates and game menus. Again, this is all in the tutorial- the example is actually a party that runs to attack you and then gives you single combat with the leader. It wouldn;t be hard to modify this so that you had only a few outrider's against this assassin and his men, or whatever you want.
 
Back
Top Bottom