[Script] RPG Mode (beta)

39 replies [Last post]
KoBeWi
KoBeWi's picture
User offline. Last seen 7 hours 56 min ago. Offline
Joined: 2010-12-25
Posts: 564

It should be known that I worked on a script for some time. I finally decided to do what I usually do: a rushed release. I originally started it even before 0.9.23, so it's high time to share it, since it's in usable state already.

So what is it about? Have you ever played Hedgewars and thought "oh, wouldn't it be cool if my hedgehogs had stats and levels and experience and stuff?"? No? Well, but it happened.

RPG Mode adds RPG elements to standard gameplay. Each hedgehog can gain experience to increase level and its stats. Each hedgehog has also a number of different classes, which determine available weapons and some class combinations activate "Combos" which might have different effects.

You can download the script here: http://www.mediafire.com/file/eivj5a8z1398r1h/RPG_Mode.hwp

The script is more or less finished. I don't work much on Hedgewars stuff anymore, so I'm doing mostly bugfixing and balancing for now. Big thanks to Shadow_The_Worm for helping with that, i.e. reporting broken stuff.
I might add some add combos or new features in the future, idk.

==========INSTRUCTIONS==========

Each hedgehog has statistics. These are as follows:
level - experience level of the hedgehog, determines available classes
lifes - number of lifes left before hedgehog will actually die
health - max health hedgehog can have, also health it has on respawn
attack - additional damage each weapon deals
defense - damage reduction hedgehog gets
speed - number of actions hedgehog can take per turn

You can see stats of currently active hedgehog on mission panel (ESC). You can also see required experience to next level there. You can gain experience by dealing damage to enemy hedgehogs. Number of experience you gain is equal to base damage you deal.

Final damage is calculated as base damage + your attack - enemy defense ± 20% random variation. This overrides the damage you deal and is used to modify health. When hedgehog's health reaches 0, it will die and lose a life. Hedgehogs will respawn with their full health until their lifes reach 0, then they will die for real. When hedgehog drowns, instead of losing life, it loses 20% of max health, with a minimum of 50. When hedgehog drowns 3 times, it loses all health instead (and the counter resets). And if it drowns with no spare lives left, it won't respawn. If you deal enough damage to make enemy health drop to -100 or below, you will get OVERKILL and your gained experience will double.

The script has also a mechanic called "underhog". Any hedgehog that is 3 levels lower than the highest level in play will become an underhog. Underhogs receive 50% more experience from dealing damage and during sudden death each turn they passively gain 10% of experience needed for the next level.

Each hedgehog can take only a number of actions equal to its speed. Weapons that end turn consume an action and once you reach the limit, you can't attack at all. Number of actions taken is shared between hedgehogs, however you can switch to hedgehog with greater speed for additional actions.

Important feature of RPG Mode are classes, which are divided into tiers. You can get tier 1 class on level 1, tier 2 on level 5 and tier 3 on level 10. Then you get new class each 5 levels without tier restrictions. Your class determines available weapons and stat gains. Health increases by 50 per level, attack and defense by 10 and speed increases by 1 each 5 levels. When class has bonus for certain stat, the gain is increased by 50%. Stat gain from multiple classes is cumulative. Each new class gives +1 speed.

List of classes and their weapons/growth:
--Null-Tier--
Hedgehog

--Tier1--
Artilleryman: Bazooka, Mortal (+defense)
Grenadier: Grenade, Cluster Grenade (+defense)
Gunslinger: Desert Eagle, Shotgun (+attack)
Fighter: Fire Punch, Whip (+health)
Scout: Rope, Parachute, Mudball (+health)
Escavator: Jackhammer, Blowtorch (+defense)
Blazer: Flame Thrower, Molotov (+attack)
Bombarder: Air Strike, Drill Strike (+defense)
Glutton: Seduction, Cleaver, Cheese (+health)
Trapper: Mine, Sticky Mine, More Damage (+defense)

--Tier2--
Demolitionist: Dynamite, Cake (+attack)
Hitter: Baseball, Hammer (+health)
Infiltrator: Saucer, Portal, Bird (+health)
Engineer: Girder, Rubber, Mud Gun, Low Gravity (+defense)
Sniper: Sniper Rifle, Sniper Scope (+attack)
Incinerator: Napalm (+attack)
Cannon Fodder: Kamikaze (+health)
Coordinator: Plane, Vampirism, Mine Strike (+defense)

--Tier3--
Infernal Grenadier: Hellish Hand Grenade, Melon Bomb (+attack)
Time Lord: Teleportation, TARDIS, Extra Time (+health)
Sciencist: Sine Gun, Freezer (+defense)
Sacrifice: Piano Strike (+attack)
Lifegiver: Invincibility, Ressurection (+health)
Barrager: Minigun, Ballgun (+attack)

Another important concept are combos. Certain class combinations yield combos, that affect weapons and gameplay. It's important to plan your growth to not only get desired weapons, but also take advantage of some powerful combos.

List of combos:

Blazer + Demolitionist = Fiery Dynamite - dynamite explosion creates fire
Artilleryman + Strategist = Triple X - bazooka and drill shoot 3 missiles at once
Artilleryman + Coordinator = Mortar Plane - RC plane drops mortar missiles
Blazer + Incinerator = Firewalker - immunity to flames (only affects current hedgehog)
Demolitionist + Incinerator = Longfire - fire lasts 3 times longer
Sniper + Sciencist = Chained Sine - when Sine Gun hits, it will create another sine seeking close enemies in a chain reaction
Blazer + Incinerator + Barrager = Balls of Fire - Ballgun balls will leave flames
Grenadier + Demolitionist + Barrager = Melongun - Ballgun shoots melon pieces instead of balls
Glutton + Hitter = Cheesy Hammer - using hammer will also drop cheese in created hole
Gunslinger + Sniper = Amplified Sniper - sniper gun damage is increased
Cannon Fodder = Kami of Life Stealing - when enemy is killed with Kamikaze, attacker doesn't lose life
Trapper + Time Lord = Teleporting Surprise - using Teleportation will leave a mine behind
Escavator + Engineeer = Tool Master - using tools doesn't consume action
Trapper + Coordinator = Thorn Counter - attackers get damaged when this hedgehog is attacked
Grenadier + Infernal Grenadier = Melon Party - melon pieces are doubled
Escavator + Sacrifice = Eternal Sonata - Piano jumps all the way down to water
Cannon Fodder + Lifegiver = Non-kamikaze Kamikaze - using Kamikaze doesn't cost life at all
Coordinator + Lifegiver = OUR Health - Vampirism heals whole team
Engineer + Barrager = Ballproof - gives invulnerability while Ballgun is in use (until last ball explodes)
Bombarder + Scientist = Ion Cannon - Air Strike fires a laser beam that obliterates everything below

The script supports parameters. Separate them by comma if using multiple:
randomclasses=true - if used, any hedgehog with Hedgehog class will get a random class assigned when their turn ends
disableunderhog=true - if used, underhog mechanic is completely disabled
disabletierlock=true - if used, you can pick classes from previous tiers
disabletripledrown=true - if used, the "drown 3 times to die" mechanic is disabled
debugmode=true - if used, press Shift + Down to quickly gain exp. Useful for testing stuff
noweaponsonfirstturn=true - if used, hedgehogs will not be able to attack on the first turn

Well, that's it. I will be adding more combos and make tweaks and balancing etc. also based on feedback. Have fun.

KoBeWi
KoBeWi's picture
User offline. Last seen 7 hours 56 min ago. Offline
Joined: 2010-12-25
Posts: 564

So, this happened: https://pastebin.com/u7KPQ3b8

Scripts desyncs in multiplayer for some reason :/

nemo
nemo's picture
User offline. Last seen 1 week 5 days ago. Offline
Joined: 2009-01-28
Posts: 1861

KoBeWi allegedly wrote:

So, this happened: https://pastebin.com/u7KPQ3b8

Scripts desyncs in multiplayer for some reason :/

so typically to learn anything useful about a desync logs from both parties are needed and ideally a demo too. However I don't see the word lua anywhere in that pastebin? Are you sure you loaded a script? And as for script desyncs in general, feel free to pastebin the exact version of script you have, can look over it for problematic operations. Unsynced randoms, use of values that aren't same between parties, floating point math...

And, you're versioning your scripts right?

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

KoBeWi
KoBeWi's picture
User offline. Last seen 7 hours 56 min ago. Offline
Joined: 2010-12-25
Posts: 564

nemo allegedly wrote:
so typically to learn anything useful about a desync logs from both parties are needed and ideally a demo too.
Ah, right. I can give that, but not now.

nemo allegedly wrote:
And as for script desyncs in general, feel free to pastebin the exact version of script you have, can look over it for problematic operations.
We used exact same script I posted here. If you want Pastebin version: https://pastebin.com/Lx62UF7t

EDIT:
Logs and demos: https://ufile.io/edi5x

nemo
nemo's picture
User offline. Last seen 1 week 5 days ago. Offline
Joined: 2009-01-28
Posts: 1861

Ok. Yeah. That script will desync.
Can't use Lua floating point math operations.

All those atan and cos operations will desync. We pretty much forbid that kind of operation on non-visual-only lua effects.

The only safe things to do in lua math IMO is addition, subtraction, multiplication of integers (so long as value is less than 2⁵³-1 same as javascript), division by a power of two. Do not send the engine any non-integer values for gears - visual gears are fine.

For division by non-power of two use div()

We'd have to expose the engine's fixed point math to avoid that issue that plagues deterministic lockstep games.

I'd suggest you reconsider how you are implementing triple missile. Maybe set hog angle and force 3 rapid fires.

Otherwise need to expose all of uFloat

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

KoBeWi
KoBeWi's picture
User offline. Last seen 7 hours 56 min ago. Offline
Joined: 2010-12-25
Posts: 564

Uh ;_;
But the script desynced right at the beginning. Not sure where.

nemo
nemo's picture
User offline. Last seen 1 week 5 days ago. Offline
Joined: 2009-01-28
Posts: 1861

Well the game log you sent didn't even load a script so maybe someone was missing a copy. But yeah, even without that it is unworkable at present

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

KoBeWi
KoBeWi's picture
User offline. Last seen 7 hours 56 min ago. Offline
Joined: 2010-12-25
Posts: 564

v2 uploaded.
-fixed error spam in OnGameTick20
-fixed hedgehog switching
-fixed some combo-related crashes
-experience per level reduced
-fixed stat updating
-potentially fixed bug where hedgehog's weapons didn't load on new turn

Seems like v1 was totally unplayable due to some bugs. Floating numbers aren't fixed yet. Also, my desync was caused by wrongly named script xd

nemo
nemo's picture
User offline. Last seen 1 week 5 days ago. Offline
Joined: 2009-01-28
Posts: 1861

Well, you're using InfAttack so setting angle and forcing fire 3 times should work pretty well. Players prob wouldn't even notice a difference if it was within a few onGameTick/onGameTick20

If you weren't using InfAttack, using mudballs to collect the 3 dx/dy would probably work too (fire them then delete them, they wouldn't burn a turn)

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

nemo
nemo's picture
User offline. Last seen 1 week 5 days ago. Offline
Joined: 2009-01-28
Posts: 1861

Oh, a thought KoBeWi - what if you just used a 1024 item Angle to integer Dx Dy mapping (or sin table whatever) ?
We should probably have that in the helper lua libs anyway. Pregenerated, no more desyncs.

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

UltiMaxKom
UltiMaxKom's picture
User offline. Last seen 4 years 12 weeks ago. Offline
Joined: 2016-06-26
Posts: 381

@KoBeWi Ooooooooh :OOO !!!

Now this is a boom :OO!
Even for a Beta Release :O!
Congrats bruh! Now let's see what you got on your RPG!
Hehehe =D

And about the features you've spoils, make me think that our project shares some major features, er... Kinda downfall for me because I've implemented many things already, can't put them down now =/. So in case if one wonder what are those similarities, I think mine and yours has (Note: haven't tried yours yet):

Quote:

*"C." Stands for "Custom"

C. Lives system
C. Health system
C. Damage system
Level system
Experience system
Stats system (Mine has STR, END, AGI, SPD, INT, WIS, ATT, DEF (RPG player surely know what's these))
Limited action system (Mine called AP - Action Points)


Then some other stuff idk--yet about, lemme check your awesome RPG game first =)

Also
A boat mine, uh...
Well, it's sad mine won't come out any soon, nor in distant future I say =[
Damn tho, I can't even get my main engine done thanks to arrr,,, hiatus ;_;
Maybe because my project is toooo ambitious and welp, real overkill (it's not meant for a casual game so yeah, it's super complex). Dunno if I could be on par or even get along the majestic release of your finished RPG next on, uff... At least it'll be over 0.9.25, waiting for devs' implementing the visual gear resizing feature duh! (thanks nemo =]])

Then talking about the crash, now I know what nemo meant by not using float values over non-visual gears works, if that is the cause ofc. I hope your next more awesome release get rid the multiplayer crash so us Hedgewarriors may know how powerful a will and a notepad++ can be! Hehe ^^

EDIT: It makes me amazed by looking at your script. I mean, yours has ~24000 character length and ~700 lines using only one single script (atm) yet mine already on ~74000 lengths and ~2400 lines just for the core script excluding 14 libraries it already used (O O) yet there's more to come because I believe it hasn't reached half the way of completion yet, the heck!? Like, yours are so awesome, but only using that little spaces? But mine that uses about a hundred of thousand of length won't even impress myself, what a bump =[
Uff...

EDIT2: You wrote "Melongung" in the combos part, just curious is this an intention? Although it won't be necessary to be a thing or smth hehe

EDIT3: As we may add feedbacks, then don't mind if I do hehe

Hi allegedly wrote:

(idk but imho one word weapon sounds better, sometimes)

Fiery Dynamite -> Incineration (at least a logical choice)
Tripple Missiles -> Tripodiac (give me some slack)
Mortar Plane (Mortal Plane eh? xD) -> Terrabomb (idk...)
Longfire -> Ablaze (uh?)
Chained Sine -> Sinelink (uh^2?)
Balls of Fire (hubba-hubba!) -> Fireballs (wut?)
Melongun (right?) -> Melongun (your welcome...)
Cheesy Hammer -> Greenslap (I have no idea why)
Amplified Sniper -> Metaljacket (it makes me hard)
Kami of Stealing Life -> Eye4Eye (oh cmon me)
Teleporting Surprise -> Pikaboom! (eh...)
Tool Master -> Architect (let's build a wall)
Psi Thorns -> Thorn (100% original)
Melon Party -> Meloniac (Maniac, said Patrick)
Eternal Sonata -> Pianist (uff)
Non-kamikaze Kamikaze -> Bomberman (don't overthink this one)
OUR Health -> Tetheralism (Absurbism, Phobianism, Nonsensism, etc x))
Ballproof -> Ballproof (okay?)
Jingle Cannon -> Memestorm (4lyfe)

PS: This is a feedback, not a police, and haven't repeated yet *cough*

╟───NW──────┼──────N╢

╓──────────────────╖ ╓──────────────────╖
⠀HP: ██████████ 1E9/1E91E9/1E9 ██████████ :MP
╙──────────────────╜ ╙──────────────────╜

KoBeWi
KoBeWi's picture
User offline. Last seen 7 hours 56 min ago. Offline
Joined: 2010-12-25
Posts: 564

v3 uploaded:
-new t3 class: Barrager - uses Minigun (moved from Demolitionist) and Ballgun (moved from Scientist)
-Extra Damage moved to Cannon Fodder
-experience required for each level is now increased by 10 instead of 50
-added some floor()s
-class storage is rewritten, now Hedgehog can have infinite number of classes
-you can get 4th and consecutive classes at level 15 and every next 5 levels (right now classes can repeat)
-Infiltrator now has health bonus, instead of attack
-new combo: Ion Cannon

I played few rounds with the mode and every single one of them ended with a draw, due to lack ground for respawning XD Also, in every round there was this one hedgehog that was totally OP. Minigun is able to easily deal 2k overkill, because each shot deals over 100 damage when attacking high vs low level XDDDD
Yeah, it needs balancing.

nemo, I don't know how to map dx/dy to angle nor how to get a sine table (other than hard-coding it).

Ulti, they are not "weapon names", but "combo names", which IMO are perfectly fine with more than one word. I like Pikaboom tho, but forgot to include it in this version.

btw, I switched from Notepad++ to VS Code.

nemo
nemo's picture
User offline. Last seen 1 week 5 days ago. Offline
Joined: 2009-01-28
Posts: 1861

Heh. Kobewi. Most trivial way for you to generate an Angle to dx/dy table would be to make a lua script to generate all angles, fire a mortar, and print out the dx/dy Big Grin

That is, set infattack and invulnerability, set hog angle, fire mortar, note down dx/dy, set angle, fire mortar, note down dx,dy...
Might need some delays in there since odds are some angles would kick the hog regardless of the map (straight up, or anything near horizontal). Just trigger next firing once hog stopped moving I guess.

Hm... I suppose if you used a mudball you wouldn't need to worry about hog moving or inf attack. Just need to be sure to give it enough power to get a nice value for the lua. Gravity and wind don't matter at spawn.

Ofc you'd only really need a quarter of the angles.

But yeah. At that point you could easily spawn gears flying any old place depending on hog aim.

Speed could be controlled ofc by div()/mult of both dx/dy by same integer scale.

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

UltiMaxKom
UltiMaxKom's picture
User offline. Last seen 4 years 12 weeks ago. Offline
Joined: 2016-06-26
Posts: 381

KoBeWi allegedly wrote:

v3 uploaded:
-new t3 class: Barrager - uses Minigun (moved from Demolitionist) and Ballgun (moved from Scientist)
-Extra Damage moved to Cannon Fodder
-experience required for each level is now increased by 10 instead of 50
-added some floor()s
-class storage is rewritten, now Hedgehog can have infinite number of classes
-you can get 4th and consecutive classes at level 15 and every next 5 levels (right now classes can repeat)
-Infiltrator now has health bonus, instead of attack
-new combo: Ion Cannon

I played few rounds with the mode and every single one of them ended with a draw, due to lack ground for respawning XD Also, in every round there was this one hedgehog that was totally OP. Minigun is able to easily deal 2k overkill, because each shot deals over 100 damage when attacking high vs low level XDDDD
Yeah, it needs balancing.

nemo, I don't know how to map dx/dy to angle nor how to get a sine table (other than hard-coding it).

Ulti, they are not "weapon names", but "combo names", which IMO are perfectly fine with more than one word. I like Pikaboom tho, but forgot to include it in this version.

btw, I switched from Notepad++ to VS Code.


First part:
Congratulations :OOO!!! And... RPG.v3 already? I'm not even reaching Au.v1e-10 yet!? It's poor me then x(

Second part:
Oh, combo names...
Didn't realize that xD good job left brain! (I've just said "(idk but imho one word weapon sounds better, sometimes)" which pin them mistake in my feedback). Anyhow, it's all great then :3

Last one:
BUT WHY D;?
Notepad++ is all Cool++! Give me some reason before you say goodbye *sob*! (so I may compare between two, in case if my uncanny betrayals take hold *lol*). If not, I would say...
It's treason then

Last one++:
Have a good day n' night ^^

╟───NW──────┼──────N╢

╓──────────────────╖ ╓──────────────────╖
⠀HP: ██████████ 1E9/1E91E9/1E9 ██████████ :MP
╙──────────────────╜ ╙──────────────────╜

KoBeWi
KoBeWi's picture
User offline. Last seen 7 hours 56 min ago. Offline
Joined: 2010-12-25
Posts: 564

UltiMaxKom allegedly wrote:
BUT WHY D;?
Notepad++ is all Cool++! Give me some reason before you say goodbye *sob*! (so I may compare between two, in case if my uncanny betrayals take hold *lol*). If not, I would say...
It's treason then
Uh, well >_>

I sometimes use Unity, which uses Visual Studio for scripting, which is a terrible program, because takes lots of space and loads long time and stuff. It also has Mono, which is even worse (total garbage). Then I discovered there's a thing like Visual Studio Code, which is open source, A LOT smaller than standard Visual Studio and pretty light-weight. I used it for Unity and its usability just struck me. It's just more polished than Notepad++, e.g. intending and auto-complete works better. I never used auto-complete, but in VS Code it's so flawless, that I have it turned on even for Ruby and LUA. Well, VS Code just has some stuff that Notepad++ doesn't and does some things better. So, um, I just replaced my Np++ with this ¯\_( •_•)_/¯
Not saying that Np++ is bad. It's really a good code editor, but was just lacking for me in some areas.
/offtopic

Shadow_The_Worm
Shadow_The_Worm's picture
User offline. Last seen 9 hours 12 min ago. Offline
Joined: 2018-02-10
Posts: 50

Precise Aim + Down Movement key are broken in this script. Every time I just intend to precisely aim down, my level gets increased by a large bargain, and it can be spammed, too. Please, mate, fix this mess. This is a good mode otherwise, but it's a bit broken and cheating at this point.

KoBeWi
KoBeWi's picture
User offline. Last seen 7 hours 56 min ago. Offline
Joined: 2010-12-25
Posts: 564

Ahh it sounds like debug option I forgot to remove.

EDIT:
Ok, re-uploaded with fix. I didn't test it though, just commented out few lines.

Shadow_The_Worm
Shadow_The_Worm's picture
User offline. Last seen 9 hours 12 min ago. Offline
Joined: 2018-02-10
Posts: 50

All right, thank you for fixing this beta script. Anyway, I've got a few points of customization for you to make in the future:
Game Options: Customizable

Game Modifiers: Selectively Customizable
Disable girders/land objects, Switch Hog, Heavy Wind and Opposite team sides: Can be customized
Per-hog ammo, Reset weapons, Random turn order and Infinite attacks: Always enabled (obiviously)
Border/bottom border, Mostly indestructable terrain, Low Gravity, No Wind, Artillery, Vampirism/Karma, Paramedics, AI Survival, Invincibility, Shared ammo, Laser sight, Place Hogs and King Mode: Always disabled
Tag Team: Always disabled (until the option to go consecutively with resetting the time will be implemented - because if it is gonna be customizable at the current point - a whole ton of time is gonna be needed all the time for 3/4 teams per clan matches unless all players are quick thinkers).

Basic Settings: Selectively Customizable
Turn Time, Sudden Death Settings, % Rope Legeth, Mines, Mine Fuse, Barrels, Air Mines and World Edge: Customizable
Damage Modifier: Always 100%
Intial Health: Always 100
Crate Drops: Customizable but it can't be lower than 3 turns - any number below 3 will be increased to 3.
% Medkits: Always 90%*
Health in Medkits: Always 25
% Retreat Time: Always 0% (because of the speed stat-based attacks (which take the unlimited attacks as the base)).
% Dud Mines: Can be customized but can't be higher than 50 - any number above 50 will be decreased to 50.

Weapons: Not Customizable
Ammo: Always 0 (dependent on class, obiviously)
Delay: Always 0 (dependent on class, obiviously. When the first class is chosen, the hog that has a class can't use the weapons just yet; all hogs in all teams should have a class before the slaughter can commence. This is to make first attacks not as cheating as they would be without the all-set team delay if there are still hogs with a class being none other than just "Hedgehog")
Chance To Drop: Always 1
Ammo In Crates: Always 1

*See the Mystery Crate below:
____________________________________________________________________
The Mystery Crate:
We all know and love that each class in the RPG Mode has its own unique set of weapons and/or utilities. But what about a little twist, a crate that gives its collector an extra weapon or utility from any class for the current turn. For example, you want to deal some damage to an enemy hog far away without switching hedgehogs, but the class of your current starter hog is not fitting for the job (for example, your current hog is a Grenadier and your enemy is located in a spot which is really hard to damage with a grenade or a cluster bomb. Or, maybe you wanted to do a quad shot with a shotgun for a total of around 100 damage at level 1 (higher levels obviously have higher damage totals). This is when this box of randomness comes into play. Collect it and wolia, you've got yourself exactly the firepower you needed. Of course, this mystery can also backfire at you. For example, you wanted a ballgun since your enemy is a bulky one, yet you got a bazooka or, even worse, a dirtball. This crate becomes less effective if it's collected by hedgehogs with more than a couple of classes, it will only add an additional ammo unit into your arsenal if you have a lot of classes on the run. Also, collecting this crate does not add an additional action, so think carefully which hedgehog is best suited for collecting this otherwordly box of mayhem. Basically, both collecting and not collecting this crate are very risky and very rewarding moves. Getting this crate at the wrong time can cost you a life, and so can not doing so at the right time. Once again, this crate's supply will be turned to dust if it's not used on the same turn it was collected. Collect and use or collect and lose. It's all up to you. Be smart with this stuff or fail miserably because you forgot to get it, got it at the wrong time or used it the wrong way. That's the whole morale of the Mystery Crate.

Shadow_The_Worm
Shadow_The_Worm's picture
User offline. Last seen 9 hours 12 min ago. Offline
Joined: 2018-02-10
Posts: 50

Another thing to note, you really should fix the life/lives messages. Instead of lifes it should be lives (since you know, grammar is everything in a truly good work). Last life comment stays the same:
Here's an example of commentary alternation:
Multiple extra lives left: Hedgehog 1 has X extra lives left.
Single extra life left: Hedgehog 1 has 1 extra life left.
No extra lives left: Hedgehog 1 has last life.

KoBeWi
KoBeWi's picture
User offline. Last seen 7 hours 56 min ago. Offline
Joined: 2010-12-25
Posts: 564

Update time!
This is mostly maintenance release that fixes some issues. I don't plan to make any big updates right now.

changelog v5
-Renamed "Sciencist" to "Scientist"
-Renamed "Psi Thorns" to "Psy Thorns"
-Renamed "Teleporting Surprise" to "Pikaboom"
-Fixed a typo (apparently lifes isn't a word lol)
-Fixed a bug that caused health/experience tags to not appear (probably broke since 1.0)
-Added underdog mechanic: if a hedgehog is 3 or more levels behind the top hedgehog, it will earn 30% more experience

Comment if there is some important bug to fix or some trivial addition to do (keep in mind that I haven't touched the script in, like, 3 years, so I don't remember most of the stuff it does). If there isn't anything, I'll want the script to be added as DLC, as some people requested it recently.

Shadow_The_Worm
Shadow_The_Worm's picture
User offline. Last seen 9 hours 12 min ago. Offline
Joined: 2018-02-10
Posts: 50

So, besides the large suggestion I posted in Discord private messages, I'd say that this script needs the Thorn fix (the combo doesn't damage properly, in fact it doesn't damage at all even through it's supposed to counterattack the attacker, just like mentioned in the first post).

KoBeWi
KoBeWi's picture
User offline. Last seen 7 hours 56 min ago. Offline
Joined: 2010-12-25
Posts: 564

Another update, mostly based on Shadow's feedback (thanks for being the only person that plays my mode Hiding )

Changelog v6
-Renamed underdog to underhog
-Increased underhog bonus from 30% to 50%
-During sudden death, all underhogs will passively get 10% of the experience they need for next level (didn't test this though)
-Fixed a bug with Thorns combo, where overkill would double the damage received by attacker
-Added CFG file, you can now select different game schemes (weapon scheme is locked)
-Added script parameter: "random classes". When used, all hedgehogs with class Hedgehog will get a randomly assigned class when turn ends

I checked the Thorns bug you mentioned and the combo works correctly. It deals back a third of damage dealt (rounded down), so you need to actually damage the hedgehog to activate the effect.

Shadow_The_Worm
Shadow_The_Worm's picture
User offline. Last seen 9 hours 12 min ago. Offline
Joined: 2018-02-10
Posts: 50

Good job right there, through the script parameters (more specifically, their inputs) could use some work for convenience and consistency with other scripts. For example, the enabled random classes parameter should be defined as randomclasses=true, the parameter for disabled underhogs - disableunderhog=true (you can also use binary for specifying the truth factor for the script parameters, for example: randomclasses=1, disableunderhog=1). Other than that through, anything else (like modifying the Blazer + Incenirator combo to grant fire damage/knockback immunity for the currently active hedgehog with that combo, making some game scheme options blocked or limited (either permanently or until further notice (see one of my earlier posts for details), adding the Mystery Crate feature, unlocking multiple tiers as soon as the first tier up happens on level 5 and adding new combos (including these which require the same tier to be unlocked) is not as important for the DLC release and can be added after it in the future versions. All RPG Mode needs before the DLC release is a little hotfix, nothing more, nothing less.

KoBeWi
KoBeWi's picture
User offline. Last seen 7 hours 56 min ago. Offline
Joined: 2010-12-25
Posts: 564

Update v7:
-Renamed 'random classes' parameter to 'randomclasses=true'
-Added 'disableunderhog=true' parameter
-Multiple parameters can be separated by comma. If parameter is invalid, there is error

Hotfix update v8
-Fixed a bug where using Resurrection tool on a hedgehog would reset its stats

The script could now be added to DLC btw.

Update v9:
-New flag: disabletiers=true. Disables all class restrictions, so you can pick any class from start
-QoL: hedgehog switch is automatically active at the start of turn
-Reworked water damage. When hedgehog drowns, it loses 20% of max hp, but a minimum of 50
-When hedgehog drowns 3 or more times in 1 turn, it loses all hp instead of taking usual "water damage"
-The above can be disabled with disabletripledrown=true flag
-Tweaked lives left message on last life. Now it's "Hedgehog has no spare lives!". This is to make it clearer that drowning on last life will kill you instantly
-Fixed speed gain. Now hedgehogs start with 0 speed and gain 1 speed for each new class
-Fixed being able to pick the same class twice
-Fixed a bug where switching to hedgehog with higher tier class selected would allow it to skip tier
-Fixed a bug where all ammo was restored when changing class
-Fixed a bug where sometimes hedgehog would gain negative experience

Update v10
Made in collaboration with Shadow_The_Worm (thanks for still being interested in this mode)

- renamed Tripple Missiles combo to Triple-X
- renamed Psy Thorns combo to Thorn Counter
- disabletiers flag was reworked into disabletierlock
- Blazer + Incinerator combo changed to Firewaker (no damage from fire)
- Longfire combo is now Incinerator + Demolitionist (making it the first same-tier combo)
- triple drown mechanic no longer resets between turns
- added enabledebug flag

Note that Firewaker combo doesn't work for some reason. I'm pretty sure I coded it correctly though, so I suspect some SetGearCollisionMask bug.

Update v11
Again contributed by Shadow_The_Worm.

- renamed 'enabledebug' flag to 'debugmode'
- debug action now gives experience required to next level instead of flat value
- fixed Hedgehogs drowning instantly on 0 lives

Shadow_The_Worm
Shadow_The_Worm's picture
User offline. Last seen 9 hours 12 min ago. Offline
Joined: 2018-02-10
Posts: 50

RPG Mode Version 11 link on hh.unti22.org (don't mind the missing original author name, both my and the script's name being merged/modified into one word without spaces or underscores - the uploader does not allow me to post the script otherwise):
https://hh.unit22.org/addons/Script/RPGMode_v11/

Shadow_The_Worm
Shadow_The_Worm's picture
User offline. Last seen 9 hours 12 min ago. Offline
Joined: 2018-02-10
Posts: 50
KoBeWi
KoBeWi's picture
User offline. Last seen 7 hours 56 min ago. Offline
Joined: 2010-12-25
Posts: 564

v12 is out. This is mostly bugfix release that fixes some breaking bugs. Thanks to Shadow_The_Worm for continued testing.

Changelog:
- renamed 'enabledebug' flag to 'debugmode'
- debug action now gives experience required to next level instead of flat value
- fixed Hedgehogs drowning instantly on 0 lives
- added 'noweaponsonfirstturn' flag that makes teams unable to use weapons on their first turn
- fixed a bug that caused freshly selected hedgehogs to ignore their speed
- thorns damage changed from 1/3 to 1/2
- removed the forced switch hedgehog on turn start
- fixed error spam when hedgehog with 0 lives drowns
- actions left counter will no longer show negative numbers

Shadow_The_Worm
Shadow_The_Worm's picture
User offline. Last seen 9 hours 12 min ago. Offline
Joined: 2018-02-10
Posts: 50
PLUSKZ
User offline. Last seen 33 weeks 4 days ago. Offline
Joined: 2021-03-22
Posts: 4

Shadow_The_Worm allegedly wrote:

RPG Mode Version 12 link: https://hh.unit22.org/addons/Script/RPGMode_v12/

link not working

KoBeWi
KoBeWi's picture
User offline. Last seen 7 hours 56 min ago. Offline
Joined: 2010-12-25
Posts: 564

The MediaFire link should still work and it's the same version.

PLUSKZ
User offline. Last seen 33 weeks 4 days ago. Offline
Joined: 2021-03-22
Posts: 4

KoBeWi allegedly wrote:

The MediaFire link should still work and it's the same version.

oh ok

Shadow_The_Worm
Shadow_The_Worm's picture
User offline. Last seen 9 hours 12 min ago. Offline
Joined: 2018-02-10
Posts: 50

For sheepluva:
Description: A script which adds RPG elements to standard gameplay. Pick classes, level up your hedgehogs and unlock powerful weapon variations.
randomclasses=true - assigns random classes to hedgehogs without a picked class.
disableunderhog=true - disables underhog mechanic.
disabletierlock=true - allows picking classes from all unlocked tiers.
disabletripledrown=true - disables triple drown mechanic.
debugmode=true - enables debug mode. Press Precise + Down to increase the current hedgehog's level by one. Intended for testing and debugging purposes.
noweaponsonfirstturn=true - prevents hedgehogs from attacking on first round.
Credits: KoBeWi, Shadow_The_Worm (you can omit my name if you want to exclude collaborators since I was the script's collaborator for versions 10 and 11 and a tester since version 4 to present)
License: CC BY 4.0

sheepluva
sheepluva's picture
User offline. Last seen 1 day 12 hours ago. Offline
Joined: 2009-07-18
Posts: 563

Thank you Shadow_The_Worm Smile

As soon as KoBeWi stops by and gives the author's okay, I'll add it Smile

Also:
We really should consider crafting some new user-driven DLC, because it doesn't look like unit22 will return.
EDIT: Nevermind. I didn't notice Bender is back Smile

  sheepluva <- me  my code stats -> 
a Hedgewars Developer


   <- where I'm from  what I speak -> 

KoBeWi
KoBeWi's picture
User offline. Last seen 7 hours 56 min ago. Offline
Joined: 2010-12-25
Posts: 564
sheepluva
sheepluva's picture
User offline. Last seen 1 day 12 hours ago. Offline
Joined: 2009-07-18
Posts: 563

Added to DLC.
Please verify.

Cheers!

  sheepluva <- me  my code stats -> 
a Hedgewars Developer


   <- where I'm from  what I speak -> 

Shadow_The_Worm
Shadow_The_Worm's picture
User offline. Last seen 9 hours 12 min ago. Offline
Joined: 2018-02-10
Posts: 50

Thank you for publishing it outside of hh.unit22.org, sheepluva. At least people will finally get to test it out without running to the forums or using the defunct DLC repositry.

Edit: Please reupload with the hotfix version I've supplied today. The one uploaded on the DLC page doesn't have the noweaponsonfirstturn=true script parameter in working order.

sheepluva
sheepluva's picture
User offline. Last seen 1 day 12 hours ago. Offline
Joined: 2009-07-18
Posts: 563

Shadow_The_Worm allegedly wrote:

Edit: Please reupload with the hotfix version I've supplied today. The one uploaded on the DLC page doesn't have the noweaponsonfirstturn=true script parameter in working order.

Done.

From what I can see your provided package breaks compatibility with the previous "v12" as it happens to also change thorn-damage from 33% to 50%, so maybe bumping the version number (e.g. to "v13") would have been a good idea.

Something to keep in mind for next time.

Cheers!

  sheepluva <- me  my code stats -> 
a Hedgewars Developer


   <- where I'm from  what I speak -> 

Shadow_The_Worm
Shadow_The_Worm's picture
User offline. Last seen 9 hours 12 min ago. Offline
Joined: 2018-02-10
Posts: 50

Quote:
From what I can see your provided package breaks compatibility with the previous "v12" as it happens to also change thorn-damage from 33% to 50%, so maybe bumping the version number (e.g. to "v13") would have been a good idea.

Something to keep in mind for next time.

Cheers!


Well, truth is, Sheepluva, I forgot to check if the code proposed for Version 12 was in the lua file had the parameter and the changelog behavior in working order. That's why it errored when Salvadorc and I were testing the script with that parameter the first time. Luckily, he was the only one who had that version aside from me.

Speaking of version numbers, there were 2 versions of 11, the A version (11) and the B version (11B) The 11B version is a minor patch of version 11. However, the check for Version 12 wasn't preformed and the jump from the changes wasn't major either. However, I do have a Version 13 in the works for KoBeWi to build off of. Also, Version 12 was actually with 50% counter damage, anything below it was with 33% counter damage.

sheepluva
sheepluva's picture
User offline. Last seen 1 day 12 hours ago. Offline
Joined: 2009-07-18
Posts: 563

Shadow_The_Worm allegedly wrote:
Luckily, he was the only one who had that version aside from me.

Good Smile

I just wanted to make sure you're aware that using different versions of the same script name will cause desyncs (e.g. when different amount of damage is taken).

Better to make sure there's only one version of each version floating around.
(How each version is named exactly is not important, the scripts' names just should never be identical if there's no actual compatibility and therefore desync-potential)

Anyway, I hope all is good now and you guys enjoy working on the next version Smile

  sheepluva <- me  my code stats -> 
a Hedgewars Developer


   <- where I'm from  what I speak -> 

Shadow_The_Worm
Shadow_The_Worm's picture
User offline. Last seen 9 hours 12 min ago. Offline
Joined: 2018-02-10
Posts: 50

Ok, thank you.

User login

Copyright © 2004-2024 Hedgewars Project. All rights reserved. [ contact ]