Jump to content

True Skills, Attributes, ECT.

Recommended Posts

I needed a break from the item System for a minute so I tried my game at what I thought I could do and have not yet been done.


I want to add character classes to my game to add bonus such as the ability to upgrade your characters stats that actually have an effect on game play. So, the easiest way, I could come up with was to use a "Tag" system. Admins can add tags to every feature, crime, ECT in the game, and add a + or - effect of the stat/tag. 

The problem: I hate copying and pasting code and editing TPL files. Since this would be editing multiple TPL files and acp files at one time. 

Thanks to @Dayo and his hook system I have managed to create this without editing any other features. And it will be easy to add the tag/skill system to other mods, with simply one word. 

Here's the concept:

It will alter the template and add a "Tags" combo box which allows multiple selections. After the form is validated.



After the form is validated, it goes to step 2. Which is where you add the effects of the tags/stats/skills. Which adds the values to the crime in this case.



There is a simple tag section in it's just a one line text box to add "Tags".



This is a working concept, with some very ugly code. Very ugly code. #1 SINCE hooks are procedal code and #2 ESPECIALLY WITH DOING STUFF LIKE THIS: Since I have no control of the hooks being called twice or multiple times. 6x sometimes. But my testing stated are done and accomplished what I wanted to do. And it seems like it is possible. 

      if($_SESSION['crimeStatus'] % 2)


This will be the new way of modding to extend features as people will no longer EVER HAVE TO TOUCH ANOTHERS PERSONS MOD TO ALTER/ADD TO IT.

Edited by Sim
Link to post
Share on other sites

Join the conversation

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

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.

  • Create New...