[Script] Game Hacks (version 22)

65 replies [Last post]
Wuzzy
Wuzzy's picture
User offline. Last seen 3 weeks 1 day ago. Offline
Joined: 2012-06-20
Posts: 1301

Game Hacks

Change everything!

Game Hacks is a style which adds over 100 additional game modifiers by using the script parameter from the game scheme. You can change the barrel health, disable jumping, adjust the number of fuel and fly time, and much more. Create even crazier games using this style!
Smile
The style on its own does not do much; you have to use the script parameter for changes to happen.

Download

Download Game Hacks from the “Downloadable Content” menu in Hedgewars or here.

The latest version is version 22 (for Hedgewars 1.0.0).

Old versions

Installation

If you downloaded Game Hacks from DLC, you just need to restart Hedgewars.

If you downloaded the file manually, you must place the HWP file into the Data directory. The directory depends on your operating system:

  • GNU/Linux: ~/.hedgewars/Data/
  • Mac OS X: ~/Library/Application Support/Hedgewars/Data/
  • Windows: %USERPROFILE%\Hedgewars\Data

Screenshots and examples

Here are some screenshots. In the parenthesis I wrote the script parameter.

Custom number of RC plane bombs (rcplanebombs=20):

Decorative shoppa border (shoppaborder=true):

David and Goliath mode makes the first hedgehog extra healthy and takes away health from everyone else (davidandgoliath=true):

Description text showing some other modes enabled:

WHAT CAN BE CHANGED?


A lot can be changed!
To give you an idea what kind of things you can change, here is a brief summary (see (almost) full list below):
  • Environment: Affects basic land objects, basic environmental parameters, some rules, etc.
  • Turns: Affects parts of the turn-based gameplay
  • Sudden Death: Additional Sudden Death gameplay modifiers
  • Hedgehogs: Tweak hedgehog effects and attributes, controls and much more
  • Fuel / duration: Control how long you can use many utilities and weapons, e.g. flying saucer fuel
  • Weapon effects / Utility effects: Tweak some fine-grained weapon and utility properties like number of eggs carried by birdy or amount of extra time
  • Weapon damage: Modify damage and explosion size of particular weapons
  • Gimmicks / eye-candy: Small silly graphical changes

Documentation and other things


To learn how to use Game Hacks, go here!

Note for developers: There's a git repository as well!: http://repo.or.cz/Hedgewars_Game_Hacks.git

Free software

Game Hacks is free software. See here for details.

Hi, I am a Hedgewars developer. Smile

Wuzzy
Wuzzy's picture
User offline. Last seen 3 weeks 1 day ago. Offline
Joined: 2012-06-20
Posts: 1301

Quick update, version 2 is released. I fixed some stupid bugs and added two small features.

Sticky mines now also can use a random timer (0-3 seconds).
I also added a new experimental setting "girders", it places short girders everywhere on the map. It is very random and unsystematic so far, many girders end up inside the landscape.
In version 0.9.22 holes will be carved for the girders which ended up inside of the landscape.

Hi, I am a Hedgewars developer. Smile

Wuzzy
Wuzzy's picture
User offline. Last seen 3 weeks 1 day ago. Offline
Joined: 2012-06-20
Posts: 1301

Version 3 is released and comes with new parameters to play around with (see the updated 1st post). New settings:

  • Maximum wind: If set, the wind will never be stronger than this. Good for beginner modes.
  • Fair wind: The wind will only change between rounds. Could be useful for fort mode.
  • Gravity: Set the base gravity.
  • Low gravity utility modifier: Set the gravity percentage (of the base gravity) to use when you use the "Low Gravity" utility. You could even turn it into a "high gravity" utility!
  • Strategic tools (experimental): Girders, rubbers, land sprays, mud balls and resurrections end your turn. Girder placement is still a bit ugly, but it seems to work. Based on my old Strategy script.

Note: Some of these settings will overwrite regular game modifierts. I.e. if you use gravity, then the "low gravity" game modifier is ignored.

Note 2: The original Gravity script still has a few more features: It can oscillate the gravity between 2 values. I don't intend to copy this feature, because it seems extremely awkward and not really usable for a turn-based game. The Gravity script also does not work together with Low Gravity utility (it is completely ignored), but Game Hacks does.

EDIT: I have updated a couple of my schemes in the scheme thread. You can now use them together with this script for some extra features! Smile

Hi, I am a Hedgewars developer. Smile

francot514
User offline. Last seen 1 year 24 weeks ago. Offline
Joined: 2015-03-20
Posts: 163

This will overwrite original game files?? i can use this to play online??

Wuzzy
Wuzzy's picture
User offline. Last seen 3 weeks 1 day ago. Offline
Joined: 2012-06-20
Posts: 1301

No files will be overwritten, but alternative files are provided in a special archive, so those files are used instead. The script uses alternatvie images for Extra Time and Extra Damage, but the original files are used as long as this script is not used. So there is nothing to worry about.

Yes, you can use this script to play online, but all players MUST have the script installed in the correct location and also have to use the same script version.


Now I release version 4 and I made my first post much more readable.

New modes:

  • Health Socialism: Health in crates is shared among your comrades, err, team mates
  • TeamCure™: If you collect a health crate, all poisoned hogs in your team get cured.
  • David and Goliath: The 1st hog in team removes half the health of its team mates and adds it to its own.
  • Hogs of Steel: Hogs can't be knocked by rope-knocking and similar means.
  • You can poison all hogs on Sudden Death
  • You can set health to 1 directly and only once on Sudden Death

And I have improved the parameter handling a lot, you now can specify values as seconds or you can specify percentages if you wish. Read the Lua script itself (don't worry, there is a large non-code comment at the top) to learn how it works.

Some bugs were fixed, too and I improved the in-game messages a bit.

I think I stop updating this script for a while now (except for bugfixes maybe) and look for actual uses of this script and maybe I'll post some screenshots and demos to show it in action. Smile

Hi, I am a Hedgewars developer. Smile

KoBeWi
KoBeWi's picture
User offline. Last seen 1 week 1 day ago. Offline
Joined: 2010-12-25
Posts: 564

Some ideas for modifications:

-number of shots per turn
-health restored by Vampirism (in %)
-bonus damage % from Extra Damage
-number of balls in Ball Gun
-number if clusters in Melon Bomb
-amount of fire from Hellish Grenade
-distance of Kamikaze
-time for Cake
-% damage dealt by hammer
-drill distance of Drill Rocket
-fuel of Pickhammer and Blowtorch

-Destruction Cumulation: Extra Damage can be used multiple times being cumulative
-Collective Consciousness: health is shared by hedgehogs in the team, any damage done to one of them will damage whole team (the % amount could be customizable?)

Wuzzy
Wuzzy's picture
User offline. Last seen 3 weeks 1 day ago. Offline
Joined: 2012-06-20
Posts: 1301

Quote:

-health restored by Vampirism (in %)
-bonus damage % from Extra Damage
-number if clusters in Melon Bomb
-amount of fire from Hellish Grenade
-% damage dealt by hammer
-drill distance of Drill Rocket
-Destruction Cumulation: Extra Damage can be used multiple times being cumulative

I think most of the values I would need here are hard-coded, so probably not possible to code in Lua (or just hard, I don't know). And I am not going to copy or imitate the damage calculation methods.
I would like to do the drill distance, but I fear I have no way to know whether a drill comes from the drill strike or not, and I don't want to overwrite the player-set timer in the drill strike.

You may also want to post (new) ideas in this thread:
http://www.hedgewars.org/node/6249

Quote:

-Collective Consciousness: health is shared by hedgehogs in the team, any damage done to one of them will damage whole team (the % amount could be customizable?)

Sounds fun, but probably slightly tricky to implement. Maybe later.

Quote:
-number of shots per turn

I have no idea how to do this in Lua, probably could only be done by the engine. The problem is that I have a hard time to find out when an "attack" has ended.
I also have posted a similar suggestion here:
http://www.hedgewars.org/node/6042

Quote:

-distance of Kamikaze
-fuel of Pickhammer and Blowtorch
-time for Cake
-number of balls in Ball Gun

Done in version 5 (just released!).
Smile

Additional parameters in version 5:

  • Ball timer
  • Bee delay timer (before homing)
  • Bee "life" timer (after homing)
  • Dangerous falling flames: Flames in mid-air will hurt hedgehogs

I also finally tweaked the positioning of the bombs (when using custom bomb amount) for air attack, mine strike and drill strike, they should now be more or less centered. At least I hope so. Napalm is still a bit glitchy, however.

Hi, I am a Hedgewars developer. Smile

Wuzzy
Wuzzy's picture
User offline. Last seen 3 weeks 1 day ago. Offline
Joined: 2012-06-20
Posts: 1301

I have just released version 6, download it here:
Script_Game_Hacks_v6.zip

As always, put it into Data/ and extract it there.

There are only 2 new features this time:

  • Hedgepot: Randomized game settings
  • Short aliases for keys and values to save space

Hedgepot
The first feature is the “Hedgepot”. This feature is HIGHLY EXPERIMENTAL and is subject to change in future versions (hopefully). If you know the Wormpot from the Worms games, you can probably guess what this does.

What this does is to change 1-5 random game modifiers (the regular ones as well as the Game Hacks' ones) and 0-1 randomized weapon/utility stats (i.e. freezer fuel) (chance of about 10% for a change). Note that not everything is covered by the Hedgepot (i.e. the shoppa border), this is intentional. The hedgepot could (in theory) be applied on top of the rest of the configuration.

The Hedgepot seems to work so far, but I think the balancing should be tweaked. I also noticed there is a small chance that the Hedgepot chooses some modifiers which do not make much sense together (i.e. invulnerability and karma).

To use it, just add “hedgepot=true” into your script parameter, but remember this is still highly experimental.

And why did I do it? Well, mostly for fun and out of boredom. Wink Smiley

Short aliases
The second feature is more like a bugfix. Nemo told me the script parameter text may only be up to 245 (or so) characters long. This can become a problem if a lot of keys are specified because you are likely to exceed this limit.

So I added short aliases for every key and also added some short value variants. Each key now has an alias which is only 1 character long. For example, “extratime” can also be written as “e”. The long names still work, of course. See the list of short alias in the Lua file (Game_Hacks_v6.lua) itself (don't worry, it is a comment, which means it is readable for non-programmers).

Hi, I am a Hedgewars developer. Smile

francot514
User offline. Last seen 1 year 24 weeks ago. Offline
Joined: 2015-03-20
Posts: 163

Quote:
There are only 2 new features this time:

Hedgepot: Randomized game settings
Short aliases for keys and values to save space

Good work, maybe this hack can be included to version beta 22, specially the randomized game settings feature.

Wuzzy
Wuzzy's picture
User offline. Last seen 3 weeks 1 day ago. Offline
Joined: 2012-06-20
Posts: 1301

francot514 allegedly wrote:

Quote:
There are only 2 new features this time:

Hedgepot: Randomized game settings
Short aliases for keys and values to save space

Good work, maybe this hack can be included to version beta 22, specially the randomized game settings feature.

My Hedgepot is still experimental and pretty unbalanced, it is possible that some contradictionary options are selected, i.e. vampirism and invulnerability.
While not strictly a bug, such combinations are just plain useless. Basically my Hedgepot needs a lot of tweaking. I think the other (real) game modifiers I coded here are more important to me to see actually implemented in Hedgewars itself (instead of just a script).



Version 7 released!

New parameters:

  • poisonkills: Hogs can die from poisoning.
  • donorbox: The last dying hog in the team (or the king in King Mode) will leave a box on death. This box contains all the team's weapons
  • buildrange: Increase the building range of the girder or disable the limit altogether. EXPERIMENTAL!

Hi, I am a Hedgewars developer. Smile

Wuzzy
Wuzzy's picture
User offline. Last seen 3 weeks 1 day ago. Offline
Joined: 2012-06-20
Posts: 1301

Game Hacks v8 is there! This mostly contains some hacks for weapons.

New modifiers:

  • nosnow: Snow doesn't pile up (like in Snow and Christmas themes)
  • hogfriction: Increase or decrease hedgehog friction
  • hellishtimer: Timer of hellish hand grenade
  • dynamitetimer: Timer of dynamite (including custom animation for up to 10 seconds)
  • deaglestrength: How deep a deagle shot digs into land
  • sniperstrength: How deep a sniper shot digs into land
  • hammerstrength: How deep a successful hammer hit digs into land
  • poisoncloudtimer: Duration of a poison cloud from old limburger (5s max.).

hogfriction works fine, but I am not sure if I will keep it in future versions.

Even more new modifiers, but these are only for 0.9.22 or later:

  • resurrectorrange: Range of resurrector (experimental!)
  • seductionrange: Range of seduction (experimental!)
  • sinestrength: Thickness of a sine gun shot
  • airminetimer: Timer of air mine
  • airmineseekrange: Range in which the air mine starts seeking hedgehog
  • airmineseekspeed: How fast air mines seek hedgehog, once they spotted one
  • airminefriction: Air friction of air mines

I also have uploaded a Git repository online because one user requested it. Here it is:

http://repo.or.cz/Hedgewars_Game_Hacks.git

Hi, I am a Hedgewars developer. Smile

Wuzzy
Wuzzy's picture
User offline. Last seen 3 weeks 1 day ago. Offline
Joined: 2012-06-20
Posts: 1301

Game Hacks v9 is there!

New modifiers:

  • drillrockettimer: Timer of drill rocket (not from airplane). Finally! This one was important to me.
  • napalmbombtimer: Timer of napalm bomb from napalm attack. The bomb drop position is still a bit
  • ropecolor: Change the rope color (0.9.22)
  • ropeopacity: Change the rope opacity from fully transparent to fully visible (0.9.22)

Other changes:

  • When enabled, timers for hellish hand grenade, drill rocket, dynamite and balls (from ball gun) can be set with the timer keys (1-5 seconds)
  • Add more random items to the Hedgepot
  • Better “surprise supplies” display of random weapon/utility modifier of Hedgepot, now shows what was modified and to what extent
  • Bugfix: Random air mine timer did not work
  • Bugfix: RC plane timer did not work

Hi, I am a Hedgewars developer. Smile

Wuzzy
Wuzzy's picture
User offline. Last seen 3 weeks 1 day ago. Offline
Joined: 2012-06-20
Posts: 1301

Game Hacks version 10 is there!

Download is here: Script_Game_Hacks_v10.zip

It turned out that changing number of plane drops (air attack missiles, etc.) still was pretty much broken in previous versions.

Now, with the help of some core changes by nemo, I was able to radically simplify the code for this and get all airplane drops (missiles, mines, drills and finally napalm, too!) right.

HOWEVER, this change means that all airplane attack based keys now will only work from 0.9.22 onwards, so you have to wait a while until you can use these keys.

There is also a new convenience key “planedrops” which combines all 4 keys “airstrikebombs”, “napalmbombs”, “minestrikemines” and “drilldrikedrills” into one.

Lastly, nemo also improved another thing in the Hedgewars code which allowed me to easily add a new set of keys, which allows you to set the distance between two “drops” of a plane.

So you could push the dropped bombs more closely together or make them more apart.

The new keys:

  • minestrikegap: Distance of 2 mines in Mine Strike
  • drillstrikegap: … in Drill Strike
  • airattackgap: … in Air Attack
  • napalmgap: … in Napalm
  • planedropgape: Set all 4 at once

Again, those parameters are for 0.9.22 or later only!

To celebrate version 10, here are some screenshots on this stuff in action, along with the script parameter which produced the result:



planedrops=12



planedropgap=200%

Hi, I am a Hedgewars developer. Smile

Wuzzy
Wuzzy's picture
User offline. Last seen 3 weeks 1 day ago. Offline
Joined: 2012-06-20
Posts: 1301

Version 11 is released!
No new features, only bugfixes, stability improvements and some small changes.

Bugfixes and minor changes:

  • When collecting a health crate in Health Socialism, will show message like “+25 (shared)” to remind the player that health is shared
  • Fix retreat time not being set when placing rubber or girder in Strategic Tools mode
  • Fix air mine timer being set to default on 2nd and later activations
  • Fix RC plane's “Bombs left:” message not being shown when there was also an airplane flying around
  • Fix donor boxes not containing air mines in 0.9.22
  • Use appropriate caption group and clan color for some captions
  • Minor documentation updates
  • More reliable parsing of numbers, filters out/ignores more bad inputs
  • Fixed: Max. possible wind to the right was off by 1 when using maxwind
  • Fixed more one-by-off mistakes involving randomness

If you find more bugs, please report them so they can be fixed.
Smile

Hi, I am a Hedgewars developer. Smile

sergiusalceanu
User offline. Last seen 2 years 3 weeks ago. Offline
Joined: 2011-02-11
Posts: 2

sweet script, it allows for a lot of fun stuff. i wish this level of customization was in the vanilla game to make people make more varied schemes

I've been on this website for over 4 years and have only two forum posts

Star and Moon
Star and Moon's picture
User offline. Last seen 1 week 6 days ago. Offline
Joined: 2010-04-03
Posts: 718

Nice! I agree, some of this stuff would make great scheme modifiers to put into Hedgewars itself, especially Health Socialism.

Some random ideas:
crateshare Extreme Socialism: Ammo crates are shared across all hedgehogs.
maxpower Max Launching Power: Everything automatically launches at max launching power. (like the Mortar)
nofalldamage Fall Damage Disabled: There is no damage from falling.
poisonspread Poison Epidemic: Poisoned hogs will poison other hogs they come in contact with.
extradamage Extra Damage: All weapons do extra (1.5) damage.
crateempty Empty Crates: X% crates don't have anything in them.
cratetrap Booby Trapped Crates: X% crates deal 5 damage instead of giving you an item or health.
cratehide Hidden Crate Types: You can't tell whether a crate will give you ammo or health. (Both use same graphics and messages)
timeboxset Time Box Limit X: The time box will automatically return your hedgehog after X turns. (If possible, allow setting to 0 to make the time box function as a random teleporter)
minerandom Random Mine Time: Mines have randomized times.

Wuzzy
Wuzzy's picture
User offline. Last seen 3 weeks 1 day ago. Offline
Joined: 2012-06-20
Posts: 1301

Quote:
crateshare Extreme Socialism: Ammo crates are shared across all hedgehogs.

I am not sure about that. Do you mean collecting 1 ammo of something gives 1 ammo to everyone?

Quote:
maxpower Max Launching Power: Everything automatically launches at max launching power. (like the Mortar)

This sounds interesting, but I am not sure if it is doable.

Quote:
nofalldamage Fall Damage Disabled: There is no damage from falling.

Yes, I definitely want this. This would be an important modifier with many uses. But I don't think I can do that with Lua alone. It would require an engine change. I already suggested this somewhere else.

Quote:
poisonspread Poison Epidemic: Poisoned hogs will poison other hogs they come in contact with.

Sounds doable and funny enough that I might implement it. It reminds me a bit of Contact Shoppa.

Quote:
extradamage Extra Damage: All weapons do extra (1.5) damage.

Already possible in Hedgewars. Just set the damage percentage in the game scheme to 150%.

Quote:
crateempty Empty Crates: X% crates don't have anything in them.

I am not sure about that, maybe I have to rewrite the entire crate spawning for this. I don't think it would be worth the work.

Quote:
cratetrap Booby Trapped Crates: X% crates deal 5 damage instead of giving you an item or health.

Same as before.

Quote:
cratehide Hidden Crate Types: You can't tell whether a crate will give you ammo or health. (Both use same graphics and messages)

This would require to replace images dynamically which is not possible at this point.

Quote:
timeboxset Time Box Limit X: The time box will automatically return your hedgehog after X turns. (If possible, allow setting to 0 to make the time box function as a random teleporter)

I will look into that and check if it is doable. This sounds certainly interesting as it would the TimeBox less random.

Quote:
minerandom Random Mine Time: Mines have randomized times.

This is already possible in Hedgewars. Just set the mine timer in the game scheme to “Random”, it will have a random time between 0 and 5 seconds.

Game Hacks also allows to modify the timers for sticky mines and air mines seperately, also random times are possible. The keys are “stickyminetimer” and “airminetimer”, respectively.

Hi, I am a Hedgewars developer. Smile

Wuzzy
Wuzzy's picture
User offline. Last seen 3 weeks 1 day ago. Offline
Joined: 2012-06-20
Posts: 1301

After a long time, I have released version 12 of Game Hacks. This is mostly based on Star and Moon's suggestions.

New modifiers:

  • epidemic: Poisoned hedgehogs infect other hedgehogs they touch.
  • maxpower: Thrown/launched weapons will be thrown/launched at full power (like mortar).
  • airminedamage: Explosion damage and range of air mine.
  • timeboxturns: TimeBox will return after this many turns have passed.
  • timeboxnotimer: TimeBox will only return when no more hogs are left or in Sudden Death.
  • minetimer: Timer of mines with millisecond precision. Use this if the normal second-based mine timer setting is not good enough for you.

Hi, I am a Hedgewars developer. Smile

Star and Moon
Star and Moon's picture
User offline. Last seen 1 week 6 days ago. Offline
Joined: 2010-04-03
Posts: 718

Cool! I gotta try this stuff out.

h3oCharles
h3oCharles's picture
User offline. Last seen 1 week 2 days ago. Offline
Joined: 2012-10-19
Posts: 129

Download is not avaliable, your account has been suspended.
EDIT: Nevermind, you can get it from the git repo

I have some suggestions for hacks
- Crate rate [reference]
- Crate limit [reference]
- Bouncy/icy/indestrucible terrain?
- Infinity bombs on the rc plane?
- No flakes?
- SD at first turn?
- Crate Shower [reference]

I have found an error, line 1419 is trying to compare a number with a nil, when I entered the Time Box poisoned. The scheme had those parameters:
poisonkills=true,poison=true,epidemic=true,sdpoison=true

oh hi

h3oCharles
h3oCharles's picture
User offline. Last seen 1 week 2 days ago. Offline
Joined: 2012-10-19
Posts: 129

Just so you know everyone, Wuzzy's hosting is back, so now there shouldn't be a problem to download the script now!

oh hi

Wuzzy
Wuzzy's picture
User offline. Last seen 3 weeks 1 day ago. Offline
Joined: 2012-06-20
Posts: 1301

Quote:

- Crate rate [reference]
- Crate limit [reference]

Those two would probably require me to basically re-implement most of the crate spawning system with Lua. I am currently not in the mood to do this.
In general, I'd prefer to have more features by Hedgewars directly; I'd gladly remove hacks from this script as Hedgewars becomes more configurable in general.

Quote:
- Bouncy/icy/indestrucible terrain?

I have thought of it before but I am not sure how to do it or if it is currently possible with Lua only.

Quote:

- Infinity bombs on the rc plane?

This sounds definitely reasonable and is doable. For now, you could just try a very large value instead.

Quote:

- No flakes?

Hmm, what's the point? Just a note here, the sticky snowflakes effect can be disabled with nosnow=true (they get replaced with harmless flakes instead).
But removing the purely decorative flakes? I don't know, especially if it is done server-side.
This sounds like something the client should decide. On the other hand, I already added some eye-candy related stuff. Hmmm, I need to think about this.

Quote:
- SD at first turn?

Sorry, I can't do that with Lua AFAIK. Basically this is a shortcoming of the engine. You can set the Sudden Death timeout in the game scheme to 0, but this will make Sudden Death start in the second turn rather the first one. Yes, the second turn, not round. This does not seem to make much sense, probably this is a stupid off-by-one error in the engine.

Quote:

- Crate Shower [reference]

In Worms Armageddon, a crate shower is only activated after collecting a utility box. Worms Armageddon's utility boxes can either contain a tool or they activate a random event or instant effect. In Hedgewars, all utility boxes just contain stuff and do not get activated instantly. I am not sure if it worth the trouble because I'd first have to introduce a entire new concept. Also I still would need to rewrite the crate spawning system in Lua. Maybe if I am bored and have too much time I'll do it.

Quote:

I have found an error, line 1419 is trying to compare a number with a nil, when I entered the Time Box poisoned. The scheme had those parameters:
poisonkills=true,poison=true,epidemic=true,sdpoison=true

Oops! Yes, this bug is real. I fixed it and I will hopefully release a new version with the bugfix and maybe some other changes.

Hi, I am a Hedgewars developer. Smile

h3oCharles
h3oCharles's picture
User offline. Last seen 1 week 2 days ago. Offline
Joined: 2012-10-19
Posts: 129

I found a bug, for parameters do "G=50", and then open up a blank hand-drawn map, put up your teams, start the game and poof! Your hogs are gone! Round Draw!

While I'm here, a suggestion, Continuous crate shower [Reference] <-- Not to be confused with Crate Shower!

oh hi

Wuzzy
Wuzzy's picture
User offline. Last seen 3 weeks 1 day ago. Offline
Joined: 2012-06-20
Posts: 1301

Yeah, the girders parameter is still considered experimental and is not very pretty IMO. But testing of experimental stuff is still appreciated, of course.
But interesting find, however. But I have no idea on how to work around this. So basically we have to live with this bug for now. That's why it is considered expeimental. Wink Smiley

Please note that Hedgewars also doesn't work if you start on an empty map. It's also an instant draw here. This is a shortcoming in Hedgewars. Worms Armageddon worked around this in a pretty smart way by simply force-adding some random girders into the map and spawn the worms on the girders. On maps filled with land Worms Armageddon also punched holes into the land first. The girders parameter works in a similar fashion, but it does not spawn or relocate any hedgehog on those girders.

The problem is, I can only add the girders after Hedgewars attempted to spawn the hedgehogs. If Hedgewars failed to do that, Game Hacks comes too late with the girders. Sad Smiley
I can't add hedgehogs manually anyways, this is only possible in missions and campaigns.

As a general note, fixing or working around bugs of the Hedgewars engine is clearly out of scope of Game Hacks (and it is simply not possible most of the time anyways).

This is really an engine issue and I will make a suggestion/complaint in the forums soon.

Hi, I am a Hedgewars developer. Smile

Wuzzy
Wuzzy's picture
User offline. Last seen 3 weeks 1 day ago. Offline
Joined: 2012-06-20
Posts: 1301

Version 13 released!

Changelog:

  • Number of RC plane bombs can now be infinite
  • Number of Birdy eggs can now be infinite
  • (currently) For the developer version (after 0.9.22) only: Many new parameters for setting the damage of many projectiles, hits and explosions (see the big comment in the script for a list). This feature is based on a brand new feature in Hedgewars, expect weirdness.
  • Bugfix: Lua error spam when a poisoned hog went to time-travel with epidemic=true

Hi, I am a Hedgewars developer. Smile

Wuzzy
Wuzzy's picture
User offline. Last seen 3 weeks 1 day ago. Offline
Joined: 2012-06-20
Posts: 1301

Version 14 released!

Changelog:

  • New modifier “stickyflames”. If set, you can choose to change the flame behaviour. Choose if you want all flames to be sticky (which means they burn through turns) or none of them (they burn out in the same turn they were created). Of course, by default you keep Hedgewars' default flame behaviour which is a mix of both
  • Add short key aliases for key names which did not have a short one yet; now short keys can be 1-2 letters long
  • Gameplay change: The epidemic does no longer spread to hogs which have the invulnerability shield active
  • Bugfix: If you used nosnow=true, the land spray failed to spit out land

Hi, I am a Hedgewars developer. Smile

Wuzzy
Wuzzy's picture
User offline. Last seen 3 weeks 1 day ago. Offline
Joined: 2012-06-20
Posts: 1301

Version 15 released! This version implements a suggestion made by a player.

New parameters:

  • pickhammerstraightdown: The pickhammer can not be skewed left or right
  • sturdycrates: Crates can not be destroyed
  • dudminehealth: How much “health” a dud mine has before exploding
  • buildlimit: Limit number of constructions, rubbers and land sprays you can use per turn.
  • healthcratehealth: Define a range of possible health contained in a health box, selected randomly
  • kamikazetrigger: Allow to explode kamikaze early with attack key

Other changes:

  • minetimer, stickyminetimer and airminetimer now accept ranges for random times, i.e. you could use random mines ranging from 1s to 2s (instead of the default 0s-5s)
  • Hedgepot has been extended
  • Minor mission message tweaks

Hi, I am a Hedgewars developer. Smile

Wuzzy
Wuzzy's picture
User offline. Last seen 3 weeks 1 day ago. Offline
Joined: 2012-06-20
Posts: 1301

Version 16 released! This is mostly a cleanup release.

New parameters:

  • hammerdamage: Damage of hammer as a denominator (1/number), so 1/2, 1/3, 1/4, 1/5, etc. of victim's health are possible
  • hammerextradamage: Same as above, but this applies when extra damage is active

Parameter changes:

  • girders has been greatly improved: girders are now placed with proper spacing instead and also not inside land anymore, but this also means there are no “girder holes” anymore. This parameter is now much better but still has minor quirks, so it is experimental and may change again in later versions
  • melonpiecedamage and clusterdamage now accept percentages as well
  • No longer considered experimental: strategictools, hedgepot
  • timeboxnotimer was removed in favor of timeboxturns=inf. Looks like nobody used it, so it should be no problem to break compability here
  • timeboxturns=inf: TimeBox returns only if last hog or in SD, not earlier

Other changes:

  • Imrpoved the documentation and description texts
  • Removed a ton of legacy code
  • Dropped official support for Hedgewars 0.9.21

Hi, I am a Hedgewars developer. Smile

Star and Moon
Star and Moon's picture
User offline. Last seen 1 week 6 days ago. Offline
Joined: 2010-04-03
Posts: 718

Finally got around to trying this out! And I have to say, I really can't figure out how to get this to work! Big Grin Could you please provide an example of how you would type these into the Script Parameter?

Wuzzy
Wuzzy's picture
User offline. Last seen 3 weeks 1 day ago. Offline
Joined: 2012-06-20
Posts: 1301

How to get Game Hacks to work:

Step 1: Select Game Hacks script
Step 2: Edit your game scheme and enter parameter list into “Script parameter” field
Step 3: Start game

Examples of what you can type into the script parameter are written in the first post. Just copy and paste and see what happens.

The parameter list is a comma-seperated list of key-value pairs, like “davidandgoliath=true, maxpower=true” (enables David and Goliath mode, all launched weapons are fired at full power).
Each comma seperates a single setting.
The value of each setting depends on its data type, there are boolean values (true or false), numbers, percentages, hex numbers, and choices.

A full explanation of how to use Game Hacks is in the source code itself, written at the top in a comment:
http://repo.or.cz/Hedgewars_Game_Hacks.git/blob/f2802df52d95e54f7e3135e777df2247b2f1164a:/Game_Hacks_v16.lua

Hi, I am a Hedgewars developer. Smile

Star and Moon
Star and Moon's picture
User offline. Last seen 1 week 6 days ago. Offline
Joined: 2010-04-03
Posts: 718

Wuzzy allegedly wrote:

How to get Game Hacks to work:

Step 1: Select Game Hacks script
Step 2: Edit your game scheme and enter parameter list into “Script parameter” field
Step 3: Start game

Examples of what you can type into the script parameter are written in the first post. Just copy and paste and see what happens.

The parameter list is a comma-seperated list of key-value pairs, like “davidandgoliath=true, maxpower=true” (enables David and Goliath mode, all launched weapons are fired at full power).
Each comma seperates a single setting.
The value of each setting depends on its data type, there are boolean values (true or false), numbers, percentages, hex numbers, and choices.

A full explanation of how to use Game Hacks is in the source code itself, written at the top in a comment:
http://repo.or.cz/Hedgewars_Game_Hacks.git/blob/f2802df52d95e54f7e3135e777df2247b2f1164a:/Game_Hacks_v16.lua

Oooh, I was missing the = signs. Thanks!

KoBeWi
KoBeWi's picture
User offline. Last seen 1 week 1 day ago. Offline
Joined: 2010-12-25
Posts: 564

I finally played with this script and playing with different values is very fun Big Grin Though the game should have better support for parameters than a single line.

Anyways, is there a possibility to ignore falling objects (maybe except hogs)? It's annoying when you set damage to 10000% and you have to wait for minutes for the falling fire. Or when you set gravity to minimum (is it possible for 0%??) and you have to wait for mines. Maybe a timeout could work.
There's also some sort of bug, when you set gravity over 100% (tested with 200 and 300), graves will try to fall infinitely and the turn never ends. (which is rather a game bug).

Also, no-knockback mode? (from all sources, including explosions and baseball bat)

francot514
User offline. Last seen 1 year 24 weeks ago. Offline
Joined: 2015-03-20
Posts: 163

This game hack is really useful, i has some ideas, that want to comment if you like it.

- Extra damage: Allow extra damage multiplier configuration.
- Low gravity quantify: Allow change value for the low gravity weapon.

Wuzzy
Wuzzy's picture
User offline. Last seen 3 weeks 1 day ago. Offline
Joined: 2012-06-20
Posts: 1301

Quote:
Anyways, is there a possibility to ignore falling objects (maybe except hogs)? It's annoying when you set damage to 10000% and you have to wait for minutes for the falling fire. Or when you set gravity to minimum (is it possible for 0%??) and you have to wait for mines. Maybe a timeout could work.

I don't know, probably its better to fix in the engine.

Quote:
There's also some sort of bug, when you set gravity over 100% (tested with 200 and 300), graves will try to fall infinitely and the turn never ends. (which is rather a game bug).

A workaround for this will be released with version 17.

Quote:
Also, no-knockback mode? (from all sources, including explosions and baseball bat)

I don't quite understand.

Quote:
- Extra damage: Allow extra damage multiplier configuration.

Yes, this has been suggested countless times but I can't implement this because of shortcomings of the Lua API. Maybe there's a really huge ugly hack to achieve this but I won't even bother. This probably needs to be implemented by Hedgewars itself.

Quote:
- Low gravity quantify: Allow change value for the low gravity weapon.

You can use the “lowgravity” key, e.g. “lowgravity=25%”. This is what you meant, right?

Hi, I am a Hedgewars developer. Smile

mikade
mikade's picture
User offline. Last seen 14 weeks 5 days ago. Offline
Joined: 2010-10-22
Posts: 355

Given the number of modifiers, purely using the script parameter seems pretty unwieldy.

User-friendliness would be greatly improved by implementing a UI akin to WxW. I imagine you could make things look relatively neat by just ordering them into categories. For bonus points, read in the starting values from script paramater as you are already doing. If you dislike the idea of having a config pop up at the start of every game, simply add the option of disabling it via (you guessed it) the script paramater.

mikade
Hedgewars Developer

Wuzzy
Wuzzy's picture
User offline. Last seen 3 weeks 1 day ago. Offline
Joined: 2012-06-20
Posts: 1301

No, I won't do that.
There are the following problems:

First, I dislike the idea in general. Game Hacks is basically an extension to the game scheme by adding a ton of more modifiers. Once configured, it should just work. The menu solution implies that some player is allowed to set all the rules in-game. I am not too happy with that. IMO there should be no special parameter required just to start playing normally.
Also, I am planning to create a bunch of schemes using the Game Hacks script, so it becomes actually useful.

Second, I think this feature would become needless the moment in which Hedgewars implements a proper script configuration system in its GUI, something which is more powerful than just a single line of text. So I guess my effort would be wasted in the long run.
Also, what you are suggesting would imply that, in the long run, all complex scripts have to provide their own “menu” system, all potentially rewriting and repeating the same kinda hacky GUI. This is bad design. WxW should be an exception here.

Third, one problem would be that it probably breaks the mission panel. There are only two ways to modify a mission panel: Goals and ShowMission. Game Hacks only uses Goals. This is useful as it just appends the text to the default text, so all the default modifiers are still visible. Sadly, Goals can only be set once. ShowMission would be the only way to implement a menu like in WxW, but it overwrites the entire mission panel, therefore losing the default text completely. Having a sane mission panel text was a key feature from the beginning, I will not sacrifice it.
Using ShowMission worked well for WxW but it won't work for Game Hacks.

Fourth, I am not sure if this complexity would be still managable. I already hacked on WxW for a while. It was a quite a pain to get the menu actually to work with all the normal game modifiers, especially place hogs. I managed to do it, but it was awful. I do not want to repeat this, honestly. xD

Lastly, I think I *really* should stop adding new modifiers and especially any major features to Game Hacks for a while (well, at least after version 17 xD). Instead, I should do more testing and make sure everything works well together. Version 18 should be a bugfix release mostly. The complexity grows constantly, I hope it is still managable. Also, I should concentrate in the future on creating and playtesting more actual schemes to play. I bet I could come up with some crazy stuff. Too bad the file format of schemes sucks so much. Sad Smiley

I hope you understand.

By the way, talking about WxW: Have you checked out the WxW script update yet?: http://hedgewars.org/node/6299

Hi, I am a Hedgewars developer. Smile

mikade
mikade's picture
User offline. Last seen 14 weeks 5 days ago. Offline
Joined: 2010-10-22
Posts: 355

Hm, I understand where you're coming from but don't really agree.

1) As aforementioned, whether players can edit settings using the UI or not could be trivially set by host in the Script Param, so this is a non-issue. You can make as many cool schemes as you like with varying Script Parameter contents, but as sharing schemes is basically a nightmare, this isn't going to help your user-friendliness problem much, and doesn't offer the same level of easy customization that a UI would either.

2) I'd love for Hedgewars to have a proper script configuration system in its GUI. Are you going to implement one? :P If not, rather than waiting for that mystical day when we have such a system, I'll keep making scripts that are as easy to play as possible using whatever is at my disposal now.

3) There's no reason you can't use ShowMission to show the same text you are getting via Goals, it just takes some work on your part. I guess you don't really /want/ to do extra work that should ideally be aided by better support from engine and frontend, but well, see 2).

4) This is a valid point. I don't know the ins and outs of your script and can't say that everything would translate smoothly. It's certainly possible, but unless you're really interested in the concept and making things easier for your users, probably not worth the effort.

I think it would be better with such a UI, but at the end of the day, it's your script and you're free to do whatever you want with it :P

I've been aware of your proposed WxW modifications for a while. They're pretty cool and I like most of them, but some of the stuff goes against what I want in the script. I'm going to do a tweak and pull it into official when time / will allows.

Anyway, gl w/ game hacks.

mikade
Hedgewars Developer

Wuzzy
Wuzzy's picture
User offline. Last seen 3 weeks 1 day ago. Offline
Joined: 2012-06-20
Posts: 1301

Well, I guess then we just disagree.

First of all, yes, of course I agree that it would be better to make this more usable. I just disagree on the methods to achive this.

Points 1 and 2, well I stick to my opinion. Improving the Hedgewars frontent instead would not only benefit Game Hacks, by the way. I also know kinda my way around Qt, so such a task is not really out of my reach. So my time would be better invested in improving the frontend. There still are a couple of other Hedgewars code contributions lying around which are waiting to be merged, but sheepluva complained again about some issues. So before I even consider trying to get my hands dirty, I first must clean up by other stuff.

Point 3 is a good reply. Yes, in theory, I could just re-implement the engine's default messages but I would really hate to do that since it must be updated with every release, must be translated twice, leads to inconsistencies, etc. It's just a huge pile of potential bugs.

Quote:
I've been aware of your proposed WxW modifications for a while. They're pretty cool and I like most of them, but some of the stuff goes against what I want in the script. I'm going to do a tweak and pull it into official when time / will allows.

Huh? I am quite surprised to hear that. What's wrong? (Please leave a reply in the WxW thread so we can discuss the things you don't like.)

Hi, I am a Hedgewars developer. Smile

sheepluva
sheepluva's picture
User offline. Last seen 2 days 4 hours ago. Offline
Joined: 2009-07-18
Posts: 563

Ideally any script would be able to inform the Frontend which parameters it supports, what type they have and what their default values are.

And the Frontend would then have a button next to the parameter input, which when clicked would show a window listing those parameters with input boxes/sliders/toggles next to them.
That way users could adjust them without knowing the parameter names etc. by heart.

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


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

mikade
mikade's picture
User offline. Last seen 14 weeks 5 days ago. Offline
Joined: 2010-10-22
Posts: 355

sheepluva allegedly wrote:

Ideally any script would be able to inform the Frontend which parameters it supports, what type they have and what their default values are.

I couldn't agree more.

But beyond this, ideally frontend should actually be aware of most of the stuff in a script's onGameInit() function. That is to say, the game flags and other variables like MinesNum, TurnTime, etc. There is no sane way for the end user to know what they can change in scheme without the script overriding it.

If allowing users more customizationin in scripts via scheme is a goal, frontend should read hard-coded values in from the script and disable the appropriate boxes so that they can't be clicked on. Without that, things are always going to feel kind of hackish unless the scripter just hard-codes all values and sets scheme in the .cfg file to locked.

mikade
Hedgewars Developer

Wuzzy
Wuzzy's picture
User offline. Last seen 3 weeks 1 day ago. Offline
Joined: 2012-06-20
Posts: 1301

Changelog:

  • noinvading: Experimental no invading mode, prevents hedgehogs from reaching the other side of the terrain
  • showbarrelhealth, showdudminehealth, showhealthcratehealth: Show “health” of barrels, dud mines and health
  • showminetimer: Show timer of mines, sticky mines and air mines
  • freezehog: Set the initial freeze level of frozen hog (affects number of rounds being frozen, etc.)
  • initialswitch will now be disabled when entering Sudden Death. This can be reverted with sdinitialswitch=false
  • barrelhealth can now be defined as a range (random values are used in-between)
  • Add possible values “min” and “max” for numeric types to set minimum and maximum permissable values.
  • Harsher value boundaries to many keys are now applied to prevent game crashes by entering extreme values (boundaries can still be disabled with forcelimits=false)
  • A few minor tweaks to the mission panel and ticker messages
  • Bugfix: Build limit did not disable building when using girder after landspray
  • Bugfix: sharehealth did not work when someone was time-travelling
  • Bugfix: Graves bounced forever with high gravity (ca. >300%). Fixed by a workaround: Gravity is just shorly reset after 15 seconds of being stuck

No Invading mode explained: A barrier appears at the center of the map, it can not be passed by hedgehogs by any means. Even ropes and portals are absorbed (this behaviour may change). Everything else goes through. Hedgehogs colloding with the barrier will simply stop as they would collied with a wall. What matters here is the starting position of the hedgehog. If the hedgehog started on the left side, it has to stay left for the rest of the match.
This mode can be very useful in combination with fort mode and this is also its main intended use, but it can be used with other modes as well. There are a few bugs in this mode remaining which I cannot fix yet, but they pretty small ones.

Screenshots:



noinvading=true



showminetimer=true, showdudminehealth=true, showbarrelhealth=true, showhealthcratehealth=true


Note about the future of this project: I plan to not do any feature updates for version 18. Instead I want to do more testing, create more actual schemes and especially using this script for playtesting and fun. Quality assurance is probably needed now as I have added a lot of new things recently.

Hi, I am a Hedgewars developer. Smile

Wuzzy
Wuzzy's picture
User offline. Last seen 3 weeks 1 day ago. Offline
Joined: 2012-06-20
Posts: 1301

Version 18 released!
This is a small bugfix release.

List of changes:

  • Fix some minor documentation mistakes
  • Change coloring of mine timer tags
  • Don't let portals go through the “No Invading” wall
  • Fix timer tags of air mines, mines and sicky mines being displayed incorrectly when near water or submerged into water

Hi, I am a Hedgewars developer. Smile

francot514
User offline. Last seen 1 year 24 weeks ago. Offline
Joined: 2015-03-20
Posts: 163

This gamehacks can be used in online, or this will be included in release version??

Wuzzy
Wuzzy's picture
User offline. Last seen 3 weeks 1 day ago. Offline
Joined: 2012-06-20
Posts: 1301

francot514 allegedly wrote:
This gamehacks can be used in online

Yes! But all players in the same room must have Game Hacks installed, and it must be of the same version.
Installing Game Hacks on your machine is explained in the first post.

francot514 allegedly wrote:
or this will be included in release version??

I don't know. Ask nemo or sheepluva or unC0Rr. Big Grin
It's a difficult question.

I don't mind if the main Hedgewars developers include Game Hacks in the release; in fact everyone can do anything with this and I still don't mind. Smile

I am, however, not sure if I'd recommend to include the script by default, however. It works pretty fine so far, this is not the issue. Another plus would be that this skips the step of players being required to install Game Hacks manually first.
But Game Hacks is certainly nothing for newbies. Using Game Hacks is something for more experiences Hedgewars players, nothing for beginners. As soon as Hedgewars provides a more user-friendly way for custom style parameters instead of just one long text field, I change my mind. If more people want to have this style included by default, I'd probably change my mind as well. But keep in mind this is just my personal opinion, I will certainly not declare war on Hedgewars (haha!) if the developers include Game Hacks anyway.

On the other hand, the developers also included HedgeEditor which is also nothing for newbies.

Hi, I am a Hedgewars developer. Smile

francot514
User offline. Last seen 1 year 24 weeks ago. Offline
Joined: 2015-03-20
Posts: 163

Wuzzy allegedly wrote:

On the other hand, the developers also included HedgeEditor which is also nothing for newbies.

Yes, youre right, booth are little tricky to config and to use in game, but will be good to test it online sometime..

Hoot
User offline. Last seen 4 years 14 weeks ago. Offline
Joined: 2013-12-14
Posts: 51

Great Wuzzy, that is exactly what I was looking for.
Just a thing ... I can't get it to work.
Under Windows10, I only can find the folder (Username)\Documents\Hedgewars\data;
or
Applications (etc.)\Hedgewars\etc.
Putting the unzipped files in /data doesn't work, at least when I enter the string "barrelhealth=5, showbarrelhealth=true" in the scheme editor as a test (1v1 local game).

for OS X:
Library/ApplicationSupport/Hedgewars/Data/Game_Hacks_v18.cfg
Library/ApplicationSupport/Hedgewars/Data/Game_Hacks_v18.hwp
Library/ApplicationSupport/Hedgewars/Data/Game_Hacks_v18.lua

there is no option to choose teh script under "Style", "Scheme" or elsewhere (am I blind?)

Any idea?

Another one, I get it right that
"barrelhealth=5-55"
would be the correct syntax for randomly applying health between 5 and 50 to each barrel, right?

Lyberta
Lyberta's picture
User offline. Last seen 3 years 33 weeks ago. Offline
Joined: 2016-09-10
Posts: 177

HWPs should be placed in Data while raw game style scripts (lua+cfg) should be placed in Data/Scripts/Multiplayer.

Hoot
User offline. Last seen 4 years 14 weeks ago. Offline
Joined: 2013-12-14
Posts: 51

Great! No it works, finally. Really a very very nice addition, makes stuff much easier.

Hoot
User offline. Last seen 4 years 14 weeks ago. Offline
Joined: 2013-12-14
Posts: 51

I guess the script still works with the update? Anything to keep an eye on?

Wuzzy
Wuzzy's picture
User offline. Last seen 3 weeks 1 day ago. Offline
Joined: 2012-06-20
Posts: 1301

I believe the script should still work for most of the part, but I haven't seriously tested it, however.

The “noinvading” setting will not work properly if you use more than 2 team colors.
This is because the game modifier “place teams in their own part of the landscape” now supports more than 2 teams, something which was not possible before.

But if you spot any serious bugs, please let me know.

Hi, I am a Hedgewars developer. Smile

Hoot
User offline. Last seen 4 years 14 weeks ago. Offline
Joined: 2013-12-14
Posts: 51

We just tested the Game Hacks with the current version across Win 10 and Ubuntu, worked like a charm. Noinvade (2 teams), barrelhealth, Saucer fuel and such (3 teams, across different map types).

Note that the path where to drop the unzipped files is different for Win 10, not sure what it depends on now (for me, it was in Documents/Hedgewars/Data, for example).

User login

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