Jump to content

Is is possible to give a creature a random chance of attack?


Guest deleted2027229

Recommended Posts

Guest deleted2027229

I.e. for a creature to have a 50% chance of attacking the player and a 50% chance of remaining passive. Is that possible in Oblivions engine and if so how would I do it in the CS?

Link to comment
Share on other sites

You can alter the creatures aggression with scripts in Oblivion, which you cannot do in Skyrim by the way. I suggest you do a quest, add a script to it that will use RAND from OBSE, so you need to load CS like this:

OBSE_Loader /editor

Now you can use all OBSE commands inside CS. CS has a Randomizer, but it sux. RAND is a real Randomizer. I can make a script example here if you do not know how to do it and if you succeeded to load CS with OBSE that is. I mostly script OBSE stuff as that is much better and faster than the old standard commands. If you do not want to use OBSE, then GetRandomProcent, which is a fake Randomizer... :/ It is therefor RAND was made really...

But briefly it will work like this.

Int MyRandomNumber

Set MyRandomNumber to GetRandomProcent
SetAV Creature.Aggression to MyRandomNumber

ModAv is more reliable, so we need to check the starting Aggression and set it to 0 and then we mod it to the random value. We could save the starting value as well, so we can reset the creature back to the starting value again if we want too.

Int StartValue

Set Startvalue to Creature.Getav Aggression
Set StartValue to StartValue - StartValue * 2

Creature.ModAv Aggression StartValue

Creature.ModAv Aggression MyRandomNumber
Edited by Pellape
Link to comment
Share on other sites

Guest deleted2027229

I would basically like Spriggans to have a 50% chance of attack or being passive but don't know how to script.

 

Alternatively, is it possible to reduce a creatures agro range so that I'd need to be very close to them for them to attack me? And if so what is the value I need to edit?

Link to comment
Share on other sites

There's no "agro range" in Oblivion, just the Aggression factor in the AI window. If aggression is higher than the NPC's/creature's disposition towards you then it will always attack. An aggression of 5 or below means it will only start combat defensively. What you could do is create another Spriggan, lower its aggression to 5 and add it to leveled lists which contain the Spriggan. That way the game has a random chance of spawning the normal Spriggan or the docile one you just created. Maybe add it to the PlayerFaction as well so it definitely won't attack you unprovoked.

Link to comment
Share on other sites

Well you do not need to script it really, but if you want it randomly, you must script it. You still need to edit every baseObject you want changed by hand in CS.

 

Start CS and look at the Spriggan to start with. You see a button at the base object called script right? Have you used CS before? Lets start from your knowledge and we go from there. I know you know even some stuff i do not even know about, but I do not know your modding skills. Lets make this, in your phase so we start with what you know and we go from there, shall we? I will try my best to be as pedagogic as I can and who knows? We might all learn something from this really. :) So lets forget that you have never scripted before as you will learn as I will guide you through it so you will get this to work, trust me.

Link to comment
Share on other sites

Something similar results from using NPCs Yield Refined except it affects NPCs as well as creatures. You may get some ideas from looking at the scripts Quabla added to/changed on kuertee's original scripts.

Link to comment
Share on other sites

WanderA. I have been thinking some about this and is it not just best you make the Spriggans to stop attacking you by lower their aggression to 10 inside their object in CS? That way, you decide if you want to attack them or not, otherwise they will just leave you alone? I guess it is your new beggar char that has issues with them right? I do think it is very cool, you try to RP a beggar inside a violent game like this. :D I looked at your screenshot, and he really look like an anti hero, a peasent, someone that really would avoid fights. So how does he gets money from begging? Is it some special mods you are using or how do you plan to play him?

 

We did had players playing or rather RP beggars and scoundrals in Ultima Online and I liked them a lot and spend some time with them when I felt like it. How do I know they where RPers? Well they where in a RP guild, otherwise I would had ignored them really. Their guild abbreviation was the proof of that they where RP:ers and I had contact with them outside the game as well, Out Of Character (OOC).

 

In WoW in the other hand, we had Chinese players, begging for real profit, as they used the gold they got from other players on the gold black market, selling gold to players for real money. They always hang outside the banks or areas filled with players...

 

-Hey, do you have some gold to spare?

-F*ch off and get your gold like every one else...

 

I do not get how players would give these guys gold really... But a lot did, otherwise there would never had been any market for it really, would it?

 

I do not get it as gold was not specially useful anyway. You could not buy the end game stuff with it, as you could only get end game currency by doing end game stuff and if I recalled right, you could not give that currency types to anyone else. maybe that is why that type(s) of currencies did pop up, to make the gold sellers less interested in the MMORPG games? Well, just a thought...

Edited by Pellape
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...