OSP Kit SP Top-Tier-Troop-to-Hero Script (Fully working but still needs a few tweaks)

Users who are viewing this thread

I made them killable already in my mod, but without reuse them option. So at least half of work is done. But before doing that, I have another idea. I want to make a little harder to upgrade a troop to be a hero. When the player decide a troop to be upgraded, then he must control the troop in duel againts one of other troops with the same type or same level, or one of companion. Let the troop prove himself that he is qualifiead as a new companion. If he looses the duel, the upgrade canceled, and the player must wait til next trigger to try again.
If you think it's a good idea, then I need your help to make the dialog. You know how bad my english is. :smile:
 
NaglFaar said:
The resource gathering system works like this:

When you enter a town to start gathering, Zombies spawn.
When you have killed every zombie in the scene, a message box appears, telling you how much the Scavengers have gathered during this first hour. Then you'll also get the option to: Stay and search another hour or leave with your spoils. If you leave, you get the resources that the crew gathered while you were fighting off the zombie-hordes with your fighters. But if you choose to stay... Things get funnier!

For each hour that you stay, you alert more zombies. So every hour the zombies increase, but so does the spoils that your searchers find. So the longer you stay, the greater the reward but the greater the risk.

If you were to fall/ die while searching, you loose all the resources that you gathered.
I have absolutely no idea why this reminds me of "The Last Stand" and "The Last Stand 2"
My system (very WIP) is going to be different, though.

All of this seems very interesting, keep up the work!
 
Hehe, now that you mention it... It does :grin:

It's a very complicated code, but I could post it. However I'm not sure why anyone would want to use it :grin:
But your familiar with the MS so I bet you could modify it to your liking.
 
GetAssista said:
it's not much different from just having a very long list of diffferent troops in the end of the same file.
The players of the mod will probably not compile it every time they start a new game

I really don't understand the objection here. Of course it's just a long list of troops at the end of the file. What's wrong with that? You make it long enough, say 200 or so, and then choose a random one out of that range. It basically looks random from the player's perspective.
 
dstemmer said:
That's OK, what's wrong with randomly generating the names at compile time?
GetAssista said:
it's not much different from just having a very long list of diffferent troops in the end of the same file.
The players of the mod will probably not compile it every time they start a new game
dstemmer said:
I really don't understand the objection here. Of course it's just a long list of troops at the end of the file. What's wrong with that? You make it long enough, say 200 or so, and then choose a random one out of that range. It basically looks random from the player's perspective.
I'm confused. So are you saying about randomly creating names or randomly selecting troops?
 
@Naglfaar, I m sory for late answer. My internet connection was lag last night. What I need is a new dialog set to replace the dialog set we use to select a hero to upgrade to. It must contain lines of dialogs that one of native companions objects player's decision to promote the selected troop. I will give a mount of random chance that it's one of them that challenge for duel. Else, the dialogs branch to player asking the troop to prove his combat ability in duel. Then player will randomly choose his opponent.

@get_assista & dstemmer,
if i was not wrong, what dstemmer wants is to use random name generator to create a very long troop list in compiling time, and use some of them only in gameplay.
Not a bad idea, but I don't like wasting PC memmory for unused troop ID. On my module, I use some trigger that work with all heroes, and I use try_for_range to deal with them. Too many unused troop_id in the range will cost much, at least on my module.
That's my objection, dstemmer.
 
that's a reasonable objection

GetAssista said:
I'm confused. So are you saying about randomly creating names or randomly selecting troops?
Create a list of hero troops with randomly generated names, then select one of them when a regular troop is upgraded to hero status.
 
dunde said:
@Naglfaar, I m sory for late answer. My internet connection was lag last night. What I need is a new dialog set to replace the dialog set we use to select a hero to upgrade to. It must contain lines of dialogs that one of native companions objects player's decision to promote the selected troop. I will give a mount of random chance that it's one of them that challenge for duel. Else, the dialogs branch to player asking the troop to prove his combat ability in duel. Then player will randomly choose his opponent.

I don't quite follow. Do you want a dialogue where a native companion refuses to accept that the new hero is about to upgrade? Can you have a 3-way conversation?


It's not hard to make a dialogue where it branches to tell him that he needs to prove his skills in a duel. I'll cook something up :grin:
 
A little improvement,
by adding :
Code:
from ID_troops import *
on the top part of module_constants.py, then you can change :
Code:
additional_heroes_begin = "trp_hero1"
additional_heroes_end = "trp_town_1_seneschal"
become:
Code:
additional_heroes_begin = trp_hero1
additional_heroes_end = trp_hero10 + 1
so you have more freedom to put the set of hero troops anywhere (but still in consecutive order) on module_troops.py
 
I'm sorry for double posting, but I found that 'go to previous line' menu never appears.
Here's the problem :
("prev",
      [
          (gt, reg10, additional_heroes_begin),
          (assign, ":limit", reg10),
          (assign, ":found", 0),       
          #(try_for_range_backwards, ":hero_id", ":limit", additional_heroes_begin),
          (try_for_range_backwards, ":hero_id", additional_heroes_begin, ":limit"),
            (lt, ":found", 4),       
            (troop_get_slot, ":hero_ocu", ":hero_id", slot_troop_occupation),
            (gt, ":hero_ocu", 0),
            (neq, ":hero_ocu",slto_kingdom_hero),
            (neq, ":hero_ocu",slto_player_companion),
            (main_party_has_troop, ":hero_ocu"),
something wrong with try_for_range_backwards's explanation on header_operations.py.
 
Back
Top Bottom