f3cuk / WICKED-AI

Wicked AI missions for your server
30 stars 59 forks source link

Testbranch - AI Humanity Change Cases #16

Closed osuapoc closed 10 years ago

osuapoc commented 10 years ago

Initial attempt at adding different player humanity change cases into the on_kill function. When using the spawn_group function, the 9th argument will be a string denoting "bandit" or "hero", which will tell the on_kill function whether to add or subtract humanity from the player when the unti has been killed. Using the case structure approach for the two alignments was done to allow for further alignments to be added in the cases of VIPs, Super AI, or hostages. The spawn_group function should default the alignment to "bandit" if it is not set in the call of the function. Currently, this call will only work with "mission" units due to the way the mission variable is set.

Also, this is untested on a live server, so please review before merging the changes.

nerdalertdk commented 10 years ago

Would be useful when making an hero mission, but right now all spawn Ai is on the east side

osuapoc commented 10 years ago

True. Currently the AI, even if heroes, would still be aggressive towards all players, as they are on the "West" team. The idea of the mission would be for heroes to camp this mission and try and stop the bandits from completing it. Or, you could have it as a hostage rescue mission where some number of the AI are unarmed, listed as heroes, so if you shoot them you take a big humanity hit. Just one of many cases where it might be nice to have more than one option for humanity gain.

nerdalertdk commented 10 years ago

Well on the server i play on its usually the bandits that camps an shoots the heros that are trying to get the weapon create

nerdalertdk commented 10 years ago

I do like the hostage part, think I have a code snippet with som spawns hostage an if one die the mission fails

f3cuk commented 10 years ago

I like the idea behind this, but it needs some more work.

Things i miss

Another thing i was thinking about is that hero or bandits should not be able to complete missions of their own kind. So a hero or bandit gone rogue killing their own kind should not only result in them getting punished humanity wise, but also should not "unlock" the crate. They should however be able to take the vehicle but it might be a nice idea to send a jet after them if they decide to do so :P

osuapoc commented 10 years ago

Interesting idea to prevent wrong alignment of character from completing the mission. You'd definitely have to have a higher numbers of missions running to keep everyone happy with available missions if it prevents them from gathering the loot.

I'll go ahead and start correcting/adding the things you mentioned about additional variables and the like.

As for correcting the mission pop-ups, I'm going to leave them as is unless someone wants to change the default missions to be bandit or hero. Actually, might be neat to incorporate a feature to have it randomly pick whether it is a hero or bandit version of a mission.

f3cuk commented 10 years ago

We'll add this for milestone 2.1.0 so we have some time to think about how we want this to be.

rockeumel commented 10 years ago

The Problem is, if a bandit player and hero player are friends and play the mission together, one of the two get always punished :(

i run my own missionscript, and i do it so, you can set a humanitythreshold, the limit between bandits and heros, if a player has less humanity then that threshold he is a bandit, above he is a hero. In my Missions bandits always get deducted humanity, heros always get humanity.