ROTK11 Random Scenarios

Use this forum to discuss hex-editing or otherwise altering any Three Kingdoms game, and to promote modded titles and patches.

Re: ROTK11 Random Scenarios

Unread postby Zyzyfer » Sat Jul 18, 2015 6:02 am

That's cool. I started playing a scenario with randomized officers and the results are interesting, to say the least. Tian Kai has 100 INT, Liu Xun (Yuan Shu's guy) is this amazing general, etc. Kind of funny and unpredictable!
Gamefaqs: KongZhou
Steam: heinous_won
User avatar
Zyzyfer
Scholar of Shen Zhou
 
Posts: 3082
Joined: Thu May 08, 2008 1:17 pm
Location: South Korea

Re: ROTK11 Random Scenarios

Unread postby Zetta » Sun Jul 26, 2015 8:15 am

Zyzyfer wrote:Let me send you my version of your v5 file and you can assess,Zetta. I think I did OK within the code you set but I can't boot to see now. But I'd love to pick around later and see if we can nail the randomizer! :)

edit: Finally got to run a trial. Now the top skills show up too much, haha. I think I can tweak the code a bit more to get the results I want. Thank you again Zetta for this program!

edit: I did a workaround by simplifying the code for stats tremendously. Now it gives a totally random skill (or nothing) to any officer with 50 LDR or WAR, a civil skill (or nothing) to those with 70 POL or CHR, a civil skill to officers with 85 POL or CHR, then checks LDR and WAR and uses the same formula for military, then checks for 85 INT and gives a strategy skill. The spread seems OK to me, although I am not sure how "random" it is by doing this, haha.


I've got some free time on my hands right now. Could you please send me your version of the officer randomizer code, so that I can implement it for the next 1.06 update ? I'm currently working on japanese files support (translated scenarios) as well.
User avatar
Zetta
Initiate
 
Posts: 77
Joined: Fri Feb 20, 2015 11:22 am

Re: ROTK11 Random Scenarios

Unread postby Zyzyfer » Sun Jul 26, 2015 3:39 pm

file

Not sure it scrubs up well, though.
Gamefaqs: KongZhou
Steam: heinous_won
User avatar
Zyzyfer
Scholar of Shen Zhou
 
Posts: 3082
Joined: Thu May 08, 2008 1:17 pm
Location: South Korea

Re: ROTK11 Random Scenarios

Unread postby Zetta » Sun Jul 26, 2015 7:25 pm

Thank you. The 1.06 update is on its way with a few new features.

By the way!
Zyzyfer wrote:Perhaps a 10% ratio, guaranteed to get a skill, say a tier 4 or very handy tier 3 skill. I've seen a list of the skill tiers before but I'd have to go back and browse old threads to relocate it. But tier 4 skills are basically the ones that unlock after you finish collecting all of the event portraits. Some of them are obvious, like God's Command and Divine Potency, but I'm not so sure about things like Divine [Unit] or Agile Mind.

Were you refering to this Japanese list found on this thread ? If so, I just finished porting it to English :

T4 (most useful) : Flying general - Capture - Valiant general - God’s command - Divine right - Divine spears - Divine bows - Puissance - Stampede - Agile mind - Divine fire - Divine potency - Focus - Black arts - Efficacy - Negotiator - Benevolent rule


T3 : Fleetness -Transport - Siege - Range - Spear general - Divine pikes - Divine cavalry - Divine forge - Poison tongue - Disconcertion - Insight - Augment - Chain reaction - Intensify - Siren - Clear thought - Fortification - Breeding - Wealth - Sustenance - Taxation - Levy


T2 : Forced march - Seamanship - Majesty - Chain attack - Close combat - Beguile - White riders - Assistance -Pike general - Archer general - Cavalry general - Divine waters - Bowmanship - Aegis - Trickery - Cunning - Gladdened heart - Pedagogy - Feng shui


T1 : Forced gallop - Traverse - Promotion - Raid - Entrap - Masterful - Exterminate - Fortitude - Indestructible - Escape route - Admiral - Vehemence - Escort - Fire assault - Covert plan- Detection - Sorcery - Integrity - Indomitable - Stirring music - Colonization - Fame - Invention - Shipbuilding - Prayer - Spousal support


T0 (least useful) : Propulsion - Antidote - Sweep asunder - Marine raid - Plunder - Iron wall - Resolute - Providence - Critical ambush Counter plan - Enlister - Wuwan ties - Qiang ties - Shanyue ties - Nanman ties - Suppression
User avatar
Zetta
Initiate
 
Posts: 77
Joined: Fri Feb 20, 2015 11:22 am

Re: ROTK11 Random Scenarios

Unread postby Zyzyfer » Mon Jul 27, 2015 1:41 am

That isn't quite the list that I was thinking of. The top tier skills on the list I'm thinking of include Providence (because it unlocks with the other top skills). But that is certainly a useful list if you ever decided to tweak the code so that better officers get a shot at a random high-tier skill. (Although I would personally raise Providence up to Tier 2 at least lol)

And I'm pretty sure I linked the wrong Rand file. I'll take another look when I get home and see what happened. The most clear-cut change is that I created a "civil officer" class. But now that I'm thinking about it, I'm starting to worry that I might have thoughtlessly saved over the file I tweaked... :shock:

edit: Hopefully, this is the file.
Gamefaqs: KongZhou
Steam: heinous_won
User avatar
Zyzyfer
Scholar of Shen Zhou
 
Posts: 3082
Joined: Thu May 08, 2008 1:17 pm
Location: South Korea

Re: ROTK11 Random Scenarios

Unread postby Zetta » Mon Jul 27, 2015 8:44 pm

Zyzyfer wrote:That isn't quite the list that I was thinking of. The top tier skills on the list I'm thinking of include Providence (because it unlocks with the other top skills). But that is certainly a useful list if you ever decided to tweak the code so that better officers get a shot at a random high-tier skill. (Although I would personally raise Providence up to Tier 2 at least lol)

And I'm pretty sure I linked the wrong Rand file. I'll take another look when I get home and see what happened. The most clear-cut change is that I created a "civil officer" class. But now that I'm thinking about it, I'm starting to worry that I might have thoughtlessly saved over the file I tweaked... :shock:

edit: Hopefully, this is the file.

That list might be useful one day, even though I didn't end up using it for officer randomization.
Thanks for the file,it looks like it's the right one. Most of your changes have been put into the source code, thank you very much for this contribution, I appreciate it !

The RandOTK has been updated to v1.06.
Image

A few changes have been made :
- the program should now support translated Japanese Scenarios as well !
- the stats/Apt randomizer has been revisited (thanks to ZyZyfer's contribution)
- a new city randomizer has been added, to change city specialty and revenue/harvest
- a new option will add random officers into the game using dead officers slots (up to 175)
- an option to randomize officers relationships (liked/dilsiked) and cut all ties (sworn brothers, spouse, family)
- a few bug fixes...
User avatar
Zetta
Initiate
 
Posts: 77
Joined: Fri Feb 20, 2015 11:22 am

Re: ROTK11 Random Scenarios

Unread postby Zyzyfer » Tue Jul 28, 2015 4:21 am

Sounds like some great new features!

I do think the officer randomizer code that I ended up with isn't exactly perfect. I don't know what Python's code limitations are either, so I'm not really sure what can be done, either. The biggest concern I came across while playtesting a scenario is that heros and strategists essentially represent 40% of the officer base, since the program just does a simple random roll with all values being equal. I do wonder if there's a way to set it so that, for instances, there's a 10% chance of rolling a hero, 10%-15% a strategist, 30% a civil officer, etc.

That said, the current code, while it definitely is a bit of overkill, seems to get the job done for the most part, although there are still weird anomalies like someone with Cs in spears and pikes and average stats getting Divine Right. But hey, it's a randomizer!

Another minor issue is that it's pretty funny to see someone like Lu Bu talk all tough, and yet his stats are pathetic.

One last thought: I went and tried to randomize RoH and it basically converts the scenario into a standard scenario. I'm not sure if it retains the RoH setting, but the officers have their availability changed according to whatever year it is. At some point, it may be worth considering a "RoH style" option?

Thanks for your efforts with this, Zetta!

edit: I wanted to also add, when I started playing some random scenarios, I also set things like lifespans, relations, compatibility, personalities, and so on to Fictional. It makes for a fresh experience. I noticed you put in some code for making new Liked/Disliked officers, which is even better. :wink:
Gamefaqs: KongZhou
Steam: heinous_won
User avatar
Zyzyfer
Scholar of Shen Zhou
 
Posts: 3082
Joined: Thu May 08, 2008 1:17 pm
Location: South Korea

Re: ROTK11 Random Scenarios

Unread postby Zetta » Tue Jul 28, 2015 7:15 am

Zyzyfer wrote:Sounds like some great new features!

I do think the officer randomizer code that I ended up with isn't exactly perfect. I don't know what Python's code limitations are either, so I'm not really sure what can be done, either. The biggest concern I came across while playtesting a scenario is that heros and strategists essentially represent 40% of the officer base, since the program just does a simple random roll with all values being equal. I do wonder if there's a way to set it so that, for instances, there's a 10% chance of rolling a hero, 10%-15% a strategist, 30% a civil officer, etc.

That said, the current code, while it definitely is a bit of overkill, seems to get the job done for the most part, although there are still weird anomalies like someone with Cs in spears and pikes and average stats getting Divine Right. But hey, it's a randomizer!

There is (almost) no limitation to Python, the only limitation is the knowledge of the programmer. In this issue, the randomizer chooses one variable among a list to create a certain type of officer:
f1 = choice([1,1,1,2,2,3,3,3,3,4,4,4,4,5,5,5,6,6,6,6])
As you can see, the list contains 20 numbers. There is 15% chance it picks the number 1 (hero), 10% it picks 2 (strategist) and so on... Therefore, there should be around 25% strategists and heroes. As for the balance of this randomizer, it could be improved but might take some tinkering and lengthen the code quite a bit. I'm still thinking about it though... Maybe in the next update.

Zyzyfer wrote:Another minor issue is that it's pretty funny to see someone like Lu Bu talk all tough, and yet his stats are pathetic.

I could add an option to randomize voice tone and a few other things... But I don't think it's really essential. And as you say it, it adds a bit of fun and random to the game!

Zyzyfer wrote:One last thought: I went and tried to randomize RoH and it basically converts the scenario into a standard scenario. I'm not sure if it retains the RoH setting, but the officers have their availability changed according to whatever year it is. At some point, it may be worth considering a "RoH style" option?

Haven't thought about it for now. For the moment, the randomizer just takes the starting year of the scenario and makes every officer dead/available/under aged/free according to it. RoH setting makes every officer age to 99 years old, isn't it ?

Zyzyfer wrote:Thanks for your efforts with this, Zetta!

edit: I wanted to also add, when I started playing some random scenarios, I also set things like lifespans, relations, compatibility, personalities, and so on to Fictional. It makes for a fresh experience. I noticed you put in some code for making new Liked/Disliked officers, which is even better. :wink:

Glad you like it, I'm also about to play a new random scenario :mrgreen: !
User avatar
Zetta
Initiate
 
Posts: 77
Joined: Fri Feb 20, 2015 11:22 am

Re: ROTK11 Random Scenarios

Unread postby Zyzyfer » Tue Jul 28, 2015 12:26 pm

Still stuck in the office, might as well respond.

Zetta wrote:There is (almost) no limitation to Python, the only limitation is the knowledge of the programmer. In this issue, the randomizer chooses one variable among a list to create a certain type of officer:
f1 = choice([1,1,1,2,2,3,3,3,3,4,4,4,4,5,5,5,6,6,6,6])
As you can see, the list contains 20 numbers. There is 15% chance it picks the number 1 (hero), 10% it picks 2 (strategist) and so on... Therefore, there should be around 25% strategists and heroes. As for the balance of this randomizer, it could be improved but might take some tinkering and lengthen the code quite a bit. I'm still thinking about it though... Maybe in the next update.


That's a much simpler solution than what I was thinking. Although when I tried something a bit similar with the skills assignment, putting in either 255, a rand string, and another identical rand string (to reduce the chance of no skill, basically), Python laughed at me and shut down!

I could add an option to randomize voice tone and a few other things... But I don't think it's really essential. And as you say it, it adds a bit of fun and random to the game!


There is a voice tone randomizer already, when you randomize personalities during scenario start-up. I was actually referring to the special dialogue and unique character qualities tied to specific officer slots.

Haven't thought about it for now. For the moment, the randomizer just takes the starting year of the scenario and makes every officer dead/available/under aged/free according to it. RoH setting makes every officer age to 99 years old, isn't it ?


I'm not sure what it does to ages, but I would imagine not. You may recall this because I'm fairly sure you've made an RoH custom scenario before, but there's a particular byte that turns the scenario into RoH. The other big difference is that officers shouldn't be underage, because they will never appear in that case.

I don't really have any other suggestions for the randomizer, although I might still attempt to tweak the skills randomizer later on. So an "RoH" option would be the last thing I could possibly ask for from your program. But if it's hard to code then forget it. :wink:
Gamefaqs: KongZhou
Steam: heinous_won
User avatar
Zyzyfer
Scholar of Shen Zhou
 
Posts: 3082
Joined: Thu May 08, 2008 1:17 pm
Location: South Korea

Re: ROTK11 Random Scenarios

Unread postby Valvatorez » Tue Jul 28, 2015 3:20 pm

Thanks for the update Zetta. Just a quick question about items, does it include the Imperial Seal and Bronze Pheasant items when randomizing them? I tried a while back to add the Bronze Pheasant item to a Sovereign but even though it shows up on their item list, it doesn't seem to give the effect since they can't build the tower. I even tried once to make multiple copies of it in the blank items and didn't have the effect either, so I guess you have to have triggered the event to build the tower even if you already own it?
And as for the RoH scenario, I usually only play RoH and I actually went through a blank copy and changed everyone's birth year so they would all appear at the same time since the randomizer didn't leave everyone available like the default RoH does, but everything else works fine, so I think maybe its not the RoH byte in the scenario, but the actual status of the officers, like 08 for dead and so on? So maybe have a RoH button that makes all "dead" or underage officers appear as officers or searchable or something? I think that's what Zyzyfer meant. But its only a small thing, otherwise great job again.

I've been playing a randomized scenario and Yang Hu had control of the entire north of the map for years but never really did anything until I took a nearby city and then he sent 250,000 troops ( :shock: ) to attack one harbor and pretty much lost all of them from one catapult unit from me taking out the hp of the harbor every turn.
User avatar
Valvatorez
Academic
 
Posts: 165
Joined: Sat Aug 23, 2014 4:18 am
Location: Zanarkand

PreviousNext

Return to Three Kingdoms Game Editing & Mods

Who is online

Users browsing this forum: No registered users and 1 guest

Copyright © 2002–2008 Kongming’s Archives. All Rights Reserved