• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Steal System

Status
Not open for further replies.
Level 37
Joined
Aug 14, 2006
Messages
7,601
Hello, hello.

I'm requesting someone to do a Steal System. I once requested this and I'm still using it in project "The Chosen Ones". However I seen it very old, badly coded and... I don't understand it completely making it bug sometimes.

I want a new one, a better one. It would take too long for me to create the system. I've my hand fulls in this enormous campaign I'm creating. I try to lighten my burden with some important requests such as this one.


About the system I'm requesting from you:

Units have an ability "Steal". When it's cast on an enemy unit the system starts. It checks if this enemy unit has something to steal, and if it has it tries to steal the item. Enemies will have only max 1 item. The stealing percent depends on various things that I'll explain later.


  • The system must be GUI so I can understand it.
  • Try to make it simple as possible so I can understand it.
  • Enemies just have one item.
  • Only two units will have this ability actually, both owned by player 1.
  • Enemies that has something to steal has a special effect over head. When the item is stolen it disappears.
  • When a succeful steal is made, the stealer gains a "thief level". This thief level unlocks some powerful things. There are two things you should also implement to the system:
    • If the Thief Level is 3 or over: Mug - When a succeful steal is made also steals gold(unitlvlx10).
    • If the Thief Level is 6 or over: Master Thief - Stealing will never again fail.


There will be four options when stealing:

  • "Stealing succeed!" => Player have succeed stolen an item.
  • "Couldn't steal anything." => Failed to steal the item.
  • "Can't steal anything." => The enemy unit's negative steal percent is stronger than player's steal percent meaning it's impossible to steal at the moment from this unit.
  • "Doesn't have any items." => This enemy doesn't have any items.

Floating texts could be excellent for showing what happened.


About the stealing percent:

  • Items, stats and other things can increase the steal chance. I've another system that determines those, so you don't need to create that.
  • The steal percent can go over 100% and same with negative.
  • Some enemies have "negative steal percent", meaning they are more "stubborn" and it's harder to steal from them. For example if player has 50% steal percent and enemy unit -25% steal percent, the final chance will be 25% to success. In other case, if the negative steal percent is stronger than the actual steal percent the stealing will fail giving: "Can't steal anything."


The basic setting that will be run in the beginning of map should have:

  • The unit that has an item
  • Unit's steal percent minus
  • And some kind of "boolean" or something is the item stolen not
  • Effect that dissipates when item is stolen



The one who can create this system will have some major credits in the campaign and rep here. Questions are always welcome.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Already started.

How do you determine which units you can steal from? I mean how do you initialize them? Manually one by one? Same with steal percent minus?

And where is the steal chance stored, how can I load it?

What about the stolen item, does it drop on the ground if your inventory is full, and otherwise it goes to your inventory?
 
Level 37
Joined
Aug 14, 2006
Messages
7,601
This is how the old system worked:


  • STEAL
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- === STEAL SYSTEM === --------
      • -------- ########################################################## --------
      • Set ST_NumberOfSetting = (ST_NumberOfSetting + 1)
      • Set ST_SETTINGS_Item[ST_NumberOfSetting] = Magical Diadem
      • Set ST_SETTINGS_Unit[ST_NumberOfSetting] = Value
      • Set ST_SETTINGS_Percent[ST_NumberOfSetting] = -30.00
      • -------- ########################################################## --------
      • Set ST_NumberOfSetting = (ST_NumberOfSetting + 1)
      • Set ST_SETTINGS_Item[ST_NumberOfSetting] = Falchion
      • Set ST_SETTINGS_Unit[ST_NumberOfSetting] = Callum 0338 <gen>
      • Set ST_SETTINGS_Percent[ST_NumberOfSetting] = -50.00
      • -------- ########################################################## --------
      • Set ST_NumberOfSetting = (ST_NumberOfSetting + 1)
      • Set ST_SETTINGS_Item[ST_NumberOfSetting] = Elixir
      • Set ST_SETTINGS_Unit[ST_NumberOfSetting] = Jeremiah 0339 <gen>
      • Set ST_SETTINGS_Percent[ST_NumberOfSetting] = -50.00
      • -------- ########################################################## --------
      • Set ST_NumberOfSetting = (ST_NumberOfSetting + 1)
      • Set ST_SETTINGS_Item[ST_NumberOfSetting] = Lesser Magic Ball
      • Set ST_SETTINGS_Unit[ST_NumberOfSetting] = Avenir 0340 <gen>
      • Set ST_SETTINGS_Percent[ST_NumberOfSetting] = -50.00
      • -------- ########################################################## --------
      • Set ST_NumberOfSetting = (ST_NumberOfSetting + 1)
      • Set ST_SETTINGS_Item[ST_NumberOfSetting] = Apocalypse
      • Set ST_SETTINGS_Unit[ST_NumberOfSetting] = (Chapter 7 Boss) 0279 <gen>
      • Set ST_SETTINGS_Percent[ST_NumberOfSetting] = -100.00
      • -------- ########################################################## --------
Just give it to the unit who steals it.


ZValue_STEAL[1] = Phodom(doesn't use this profession...)
ZValue_STEAL[2] = Fradz
ZValue_STEAL[3] = Galeoth

Real variables.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Yeah, it was the boss leaderboard that I made for you. I was watching a gameplay video and when a boss fight came I was like "Holy shit, that looks exactly like the leaderboard system I created". And as it turned out, it was the same system.

Is this ok initialization?
  • Steal Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- ---------------------------------------- --------
      • Set u1 = Mountain King 0008 <gen>
      • Custom script: set udg_ID = GetHandleId(udg_u1)
      • Hero - Create Claws of Attack +15 and give it to u1
      • Hashtable - Save Handle Of(Last created item) as (Key item) of ID in StealHash
      • Hashtable - Save (Random real number between -100.00 and 0.00) as (Key stealminus) of ID in StealHash
      • -------- ---------------------------------------- --------
You create the item that can be stolen and save the handle so you know what item should be given to the stealer. Then save the chance. And you do this for every unit, one by one.
 
Status
Not open for further replies.
Top