Author Topic: Trench Digging V10  (Read 5256 times)

This is long overdue, but after a super long break, I decided to finally update this mod.
Changelog to date is:
Code: [Select]
V9 to V10
---------
Added saving dirt by implementing Destiny's blockByte system
Added Trench Cluster Item
Added Trench Cluster Bomb Item (disappears after 1 use)
Fixed /dumpDirt not working in even more cases
Added /addDirt *player* *amount* *colorID*
Added /removeDirt *player* *amount*
Added changelog in the mod
---------

V8 to V9
--------
Fixed /dumpDirt not working in certain cases.
--------

V7 to V8
--------
Fixed the RTB Pref for dirt count not showing up.
--------

V6 to V7
--------
A whole brick category for "Dirt" bricks
This will allow for multiple dirt colors able to exist in one game
This will allow for the mod to run on any server, regardless of server type
Say, in a freebuild, you don't have to worry about people digging up your house, because it has a certain colored brick in it.
Instead of setting color ids and all that nonsense to dig up bricks, you just build dirt bricks
Cube mode and Brick mode no longer exist separately
/DumpDirt command should now work everywhere a 4x Cube or 4x4 Brick should fit
Regrouping sets the end result regrouped brick to the majority color (of the original regrouped bricks)
/SpeedDig and /SpeedPlace work again for admins
Some bug fixes
--------

V5 to V6
--------
Bug Fixes
Changed /setDirtColor cmd to /getColor so you may get the color id of the brick you are looking at so that you may enter that in RTB Server Options.
A little bit more clear of a description to set up
--------

V4 to V5
--------
Added an RTB Pref that allows you to choose what dirt type you would like to choose: Cubes or Bricks (Bricks is referring to smallest unit as a 1x1 brick and largest an 8x16 brick)
Minor bug fixes
Some code clean-up
Added a serverCmd to set the dirt color
Either type /setDirtColor *colorIdHere*
ex: /setDirtColor 32
Or type /setDirtColor - and it will set the dirt color to the brick you are looking at
*Changing the pref through RTB is preferred, as it will most likely save the value for the next time you host
--------

V3 to V4
--------
Big changes:
Everything works by cubes now:
Smallest unit is a 2x cube and the largest is 32x cube
Fixed the brick count being inaccurate
Fixed most instances of falling through or getting stuck in bricks that are split or regrouped.
--------

V2 to V3
--------
Fixed minor typo with finding a correct brown in your colorset.
--------

V1 to V2
--------
Fixed the problem where the admin commands /speedDig and /speedPlace caused errors in the console.
--------

Here is the download link for V10:
Gamemode_TrenchDigging.zip

Please post any bugs you find in this topic before I update via RTB. /dumpDirt should be fixed in all cases now. And servers are now able to run this 24/7 due to saving dirt and color values using Destiny's blockByte system.

I hope you included the cluster bomb from V8. No one has included the cluster bomb after each port.

When thrown it hits the ground and then it takes the bricks and throws it in different directions.  Anyone caught in the blast dies.

wooo for laggiest gamemode ever!

I hope you included the cluster bomb from V8. No one has included the cluster bomb after each port.

When thrown it hits the ground and then it takes the bricks and throws it in different directions.  Anyone caught in the blast dies.
Yep, you can see in the change log, the cluster bomb item has been added.

Also, there was a lot of updating to do to change over to the saving system, so if anything blatantly doesn't work or breaks, just calmly let me know here and I will address it. I tested a bit before uploading here, so it should work for the most part.

You can already host 24/7 servers with this. What's different?

You can already host 24/7 servers with this. What's different?
It's just easier now because all players can use /dumpDirt anywhere that is possible so admins don't need to be constantly present to help out clearing dirt for them, and now dirt is saved so players leaving and rejoining don't have to worry about losing dirt or whatever they might complain about.

You can already host 24/7 servers with this. What's different?
What Jardev said

Error when executing :c -
Code: [Select]
Loading Add-On: Gamemode_TrenchDigging (CRC:595510378)
Add-Ons/Gamemode_TrenchDigging/TrenchDigging.cs Line: 280 - Syntax error.
>>> Some error context, with ## on sides of error halt:
^^^^TrenchDigSO.value["trenchDirtCount",%targClient.getBLID()] += %amt;
^^^^
^^^^for(%i = 1;%i <= %amt;%i++)
^^^^{
^^^^^TrenchDigSO.value["trenchDirtList",%targClient.getBLID()] = trim(TrenchDigSO.value["trenchDirtList",%targClient.getBLID()] SPC %colorID;##
##^^^^}
^^^^%first = getColorIDTable(%colorID);
^^^^%a = getWord(%first,3) * 255;
^^^^%r = mFloor((getWord(%first,0) * 255) - (255 - %a));
^^^^%g = mFloor((getWord(%first,1) * 255) - (255 - %a));
^^^^%b = mFloor((getWord(%first,2) * 255) - (255 - %a));
^^^^%hex = getHex(%r) @ getHex(%g) @ getHex(%b);
>>> Error report complete.

Error when executing :c -
Code: [Select]
Loading Add-On: Gamemode_TrenchDigging (CRC:595510378)
Add-Ons/Gamemode_TrenchDigging/TrenchDigging.cs Line: 280 - Syntax error.
>>> Some error context, with ## on sides of error halt:
^^^^TrenchDigSO.value["trenchDirtCount",%targClient.getBLID()] += %amt;
^^^^
^^^^for(%i = 1;%i <= %amt;%i++)
^^^^{
^^^^^TrenchDigSO.value["trenchDirtList",%targClient.getBLID()] = trim(TrenchDigSO.value["trenchDirtList",%targClient.getBLID()] SPC %colorID;##
##^^^^}
^^^^%first = getColorIDTable(%colorID);
^^^^%a = getWord(%first,3) * 255;
^^^^%r = mFloor((getWord(%first,0) * 255) - (255 - %a));
^^^^%g = mFloor((getWord(%first,1) * 255) - (255 - %a));
^^^^%b = mFloor((getWord(%first,2) * 255) - (255 - %a));
^^^^%hex = getHex(%r) @ getHex(%g) @ getHex(%b);
>>> Error report complete.
Whoops, added that last second. Fixed.

Trench Cluster Bomb is broken

Trench Cluster Bomb is broken
In which way? The more info the better and the faster it will get fixed.

In which way? The more info the better and the faster it will get fixed.
If I fire it, it just does the spear animation repeatedly.

If I fire it, it just does the spear animation repeatedly.
Alright, I'm unable to test it right now, but I think I might have fixed it. I was missing the state where it essentially resets the spear after throwing. That might have been causing the loop.
Let me know if it works now please.

Yay, back from the dead

Yay, back from the dead
Somewhat :). I hope to become a bit more active, but it can be hard sometimes.