Jump to content
The Dark Mod Forums

Script: Per limb damage, skill system (WIP)


MirceaKitsune

Recommended Posts

The augmentation system is one step closer to completion! Today I finally implemented the power system, with draining and regeneration as well as the visual bar (follows all HUD settings adjusted in the main menu). Different augmentations drain different amounts of energy at different times, some only while working others all the time. Regeneration is itself achieved via photosynthesis, meaning the player must stand close to a light source in order to regain power... this should add an interesting gameplay element by pushing the player to expose theirself and sit in bright areas when enemy AI aren't looking.

At the moment the only thing I'm waiting for before posting a 2.0 beta is finishing the per-augmentation HUD icons. There's still a single HUD element with everything drawn exclusively for visualization, to which I also added the power bar as can be seen below. I have a bunch of icons which look okay(ish) in my book, but may still browse OpenClipArt for even better ones as I'm not satisfied with a few of the designs and how they appear at the small size required for the HUD.

testing_2021-01-04_00_02_24.jpg.f95086a397b910f5d098820232347376.jpg

  • Like 1
Link to comment
Share on other sites

It took one heck of an amount of work, but it's finally been done: Functional skills / augmentations are now in principle implemented! The update contains the same player damage system but with limb based enhancements fully working as well :D

Today I finally separated the individual HUD components for each aug and made the icons operational, which is enough to post a beta for version 2.0 of this plugin. I improved and replaced some of the icons at the last moment, making them more visible and better suited for the effects they represent.

hud.jpg.e4d93402c56a1406243e6b2efd2af7d4.jpg

Remember this version is still mainly for testing purposes! The skills are yet to be tested in a real FM, and most importantly there's no upgrade items implemented yet: The player will currently start out with all augmentations automatically upgraded to level 4, the next (and final) step is adding upgrade items to slowly gain them during a FM.

Here's the latest pk4. Delete any previous version, then as usual simply drop this into your TDM folder which should automatically enable all the functionality in any FM. Testing would be appreciated; There are things I may not be able to change due to limits in the scripting system, but if there's any annoyance I can fix I shall look at it in the next update.

player_2.0.pk4

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Nice work - I think for testing you might like to go to the general TDM forum, since the editing section probably only attracts a subset of community members.

Importantly, I think the .pk4 will have to be named such that it sorts alphabetically after tdm_base.pk4, i.e. prepend a z_.

It'd possibly make the life of your testers easier if you provided an alternative download where all upgrades start at 0, and provide a list of cvars that the player can enter into the console to upgrade individual skills. People might like to try them one at a time, rather than a potentially overwhelming 16 at once, especially when it comes to troubleshooting.

Link to comment
Share on other sites

7 minutes ago, Dragofer said:

Nice work - I think for testing you might like to go to the general TDM forum, since the editing section probably only attracts a subset of community members.

Importantly, I think the .pk4 will have to be named such that it sorts alphabetically after tdm_base.pk4, i.e. prepend a z_.

It'd possibly make the life of your testers easier if you provided an alternative download where all upgrades start at 0, and provide a list of cvars that the player can enter into the console to upgrade individual skills. People might like to try them one at a time, rather than a potentially overwhelming 16 at once, especially when it comes to troubleshooting.

Thanks, I'll keep that in mind. I think that if I open a new thread there, it will be after the next update: I want to add the last component (upgrade items) first and clean up anything that might still be obviously wrong. Hopefully it won't be too long till that point... just need to design a nice little lwo model for the items, then come up with a solution for vanilla FM's that won't have them thus I'll need to spawn those somehow.

Link to comment
Share on other sites

Also, only logged in users can see and download forum attachments, so you might want to provide a link to an external hosting site later on - in case your addon motivates someone to register, or just to make it more convenient.

Link to comment
Share on other sites

  • 2 weeks later...

Worked on the item implementation today. Going for a prism thingie that looks somewhat like a potion... the design feels okay overall, but I don't feel like also texturing it and so far I'm uncertain how well using a default metal texture for the frame looks like. Maybe someone has a good lwo they're willing to donate? Let me know if so.

testing_2021-01-18_01_30_53.thumb.jpg.ef417c4e47540c8618d525d59d7b60a8.jpg

Functionality is done just needs polishing. The player no longer starts with any augmentations installed, picking up and using the items is now the only way to get augs.

  • Like 1
Link to comment
Share on other sites

https://opengameart.org/content/turbine-textured

Silly me for not using this sooner. Looks 1000 times better than the silly pyramid I was struggling to make! It's also GPL compatible so I can integrate it into The Dark Module once I make this a default component for it. Only problem is the model is pretty high poly... I didn't want to ruin the original so I only decimated two LOD's instead, reduced shadow mesh included: FPS will drop if looking at too many of those items up close, but mappers shouldn't need to place more than 4 which can be viewed simultaneously which should be okay.

testing_2021-01-19_18_17_07.thumb.jpg.434f7bce2936354fafd487b94ba2d3bf.jpg

  • Like 1
Link to comment
Share on other sites

Quote

It's also GPL compatible so I can integrate it into The Dark Module once I make this a default component for it.

That model doesn't really suit the TDM setting as it looks currently...it has wires and fairly modern looking pipes and logos on it.

Link to comment
Share on other sites

3 hours ago, Springheel said:

That model doesn't really suit the TDM setting as it looks currently...it has wires and fairly modern looking pipes and logos on it.

It's not perfect but one of the only models I could find that looks okay. It's a bit too modern for TDM I agree, though at the same time grimey enough to fit the existing generators and other devices. It's worth remembering that like other mods I'm thinking of doing, it will be defaulted in my cyberpunk conversion BUT also available as a plugin for FM's / players for vanilla TDM, thus I'm juggling to make it fit both setups somewhat. It can be changed later if a better one comes up... for now I also need to finish a few remaining tweaks for the next version.

Link to comment
Share on other sites

  • 2 weeks later...

Slowly getting there. I want to clear up two concerns I have left before posting the next version: Help with answers would be greatly appreciated.

First of all I want to ask which of two implementations is better: Running the code directly, or making it part of an invisible entity which I spawn at map start? At the moment everything is handled by a detached function called by tdm_user_addons.script / user_addon_init() which directly launches a while(1) loop that calls function. I noticed however that TDM likes to work with entities for in-game functionality: Would it be more ideal to pack everything into an invisible entity instead, implement all functionality as a scriptobject for it, and just have user_addon_init spawn that entity on map start? Both methods should work fine at the end of the day, but I want to go the route that's better.

And the second question: Are all images used in a GUI precached when its overlay is spawned, including ones that aren't active at that time but will be later set by an onNamedEvent changing the background of an element? I thought I saw a few hiccups during testing and wanted to make sure it's not due to unprecached GUI graphics.

Link to comment
Share on other sites

1) I think it makes no difference. Assigning scripts to individual entities to great is when you want multiple entities to share the same scripting (i.e. lightholders), but for something which exists only once, like your player upgrade system, it's more convenient to run the code directly.

2) Reminds me a bit of 0005334, maybe there's a relation? I can't give insight into how GUIs cache images.

  • Like 1
Link to comment
Share on other sites

Finished the item inventory icon, custom sounds, particle definitions. Code and item wise everything is almost ready.

testing_2021-02-07_01_04_10.thumb.jpg.629c5d0cba3ab54cad0ecdd4b6cca094.jpg

Only change left in the code is ensuring that augmentations will persist between campaign levels; The campaign documentation says I simply need to use setPersistantArg / getPersistantFloat which I can simply replace my $player1.setKey() / $player1.getFloatKey() with.

Only one question: Should I be doing this for limb health as well? That only makes sense if normal player health is persisted between levels, which I didn't check and don't have a test case handy for; If you finish a campaign level with some damage, will you still be damaged in the next level, or do you always start the next map fully healed?

  • Like 1
Link to comment
Share on other sites

The convention is that the player starts every mission rested and at full health, so I'd say limb damage should be healed too.

By the way, there seems to be a problem with persistant args. You might need to work around this by giving a persistant inventory item which contains all the properties you want to carry over.

Link to comment
Share on other sites

Version 3.0 is here! It includes the latest changes and fixes... including persistent floats so augmentations stick throughout campaign levels, and of course the items used to install the augmentations. As it exceeds the file size for forum attachments, you can download it from one of those links:

Mirror 1
Mirror 2

Only problem is that you'll get no augmentations on existing maps, they don't contain the items placed in the world. I'm planning to fix this in the next version which shall be the final major update. I'll be introducing a cvar or worldspawn arg, which will make those items spawn as the player picks up loot and reaches a certain threshold; This way if the map doesn't indicate that it contains augmentation items, they'll appear in place of some loot items as a reward. It's not perfect but that feels like the only way to have them in existing FM's.

  • Like 1
Link to comment
Share on other sites

Link to comment
Share on other sites

1 hour ago, Dragofer said:

Nice work - I'm in particular curious how you were able to get persistant args to work, since I recently heard of them not working.

I simply use sys.setPersistentArg / sys.getPersistentFloat instead of $player1.setKey / $player1.getFloatKey for the augmentation levels. I can only confirm it sticks in savegames, haven't tested actual campaigns: If there's an issue with persistence between campaign levels, that sounds like a bug in core and will need to be fixed.

Link to comment
Share on other sites

If it doesn't actually work in campaigns (can test in Down by the Riverside or NHAT), then you'll probably need to workaround by using a persistant inventory item with spawnargs representing the state of the implants.

Link to comment
Share on other sites

This is an interesting little mod, never occurred to me that limb damage could be a thing in TDM. The way you've been implementing it reminds me a lot of Escape from Tarkov. Not sure if you are familiar with the game, but it could be worth watching this 5 min video explaining the healing system, might give some inspiration.

 

My Fan Missions:

   Series:                                                                           Standalone:

Chronicles of Skulduggery 0: To Catch a Thief                     The Night of Reluctant Benefaction

Chronicles of Skulduggery 1: Pearls and Swine                    Langhorne Lodge

Chronicles of Skulduggery 2: A Precarious Position              

Chronicles of Skulduggery 3: Sacricide

 

 

 

Link to comment
Share on other sites

  • 2 years later...
4 hours ago, snatcher said:

@MirceaKitsune

Can you give your baby (v3) a marketable name or acronym, please? 😊

I haven't made any updates to this recently, and generally I'm bad with names: Feel free to give it any name you wish in the mod pack! Thank you and I'm happy you like it, hope others will enjoy giving this a go in practice :)

Link to comment
Share on other sites

22 hours ago, MirceaKitsune said:

[...] generally I'm bad with names [...]

You alone you think? 😁

"Augmentation Mod" sounds fitting and even catchy. Let's have that as the working title, until you come up with a more suitable name.

We have a name and now we need purpose. The Augmentation Mod was supposed to be part of a campaign of yours of some sort that might never see the light. Why would players want to play with this mod in TDM "as is" today? What's the story behind all this? How come this dude or thing with this, never seen before abilities, landed in this world? Does he come from a past that never was or from a future? colliding parallel universes? What's his mission?

If you/we don't figure it out, we aren't going to be able to sell it.

Edited by snatcher
  • Like 1

TDM Modpack 4.0

Link to comment
Share on other sites

The way I see it is that when playing a game for the first time players always play the vanilla version. Exceptions are when a game is known for critical bugs or old enough that requires a fix or patch to run properly but regardless, players don't mod games on their first run. Now, playing a game a second time opens up a whole new scenario and here is where mods spice things up: play the same but differently.

Here is an idea.

The Augmented are qualified players from a future, cyberpunk era. Augmented participate in simulations by impersonating a character and in the Mircea complex the Augmented line up for the upcoming Tournament: The Dark Module. Equipment, mechanics and rules differ from module to module but all games share the same, single goal: complete a simulation as fast as possible.

Now, if you like this premise then the Augmentation Mod must be built around the one rule: get to the Mission Complete as fast as you can.

In order to make the most out of the limb damage system I suggest a kind of weak character with outstanding healing capabilities. And since the mod is about speed I suggest players level up or level down in accordance with how much they run.

  • Like 1

TDM Modpack 4.0

Link to comment
Share on other sites

  • 6 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...