Old 08-09-2010   #151
motorsport71
Teach Me Wise Ones, Leave Me Alone Stupid Ones
 
Join Date: Dec 2009
Location: Pittsburgh
Posts: 161
motorsport71 will become famous soon enoughmotorsport71 will become famous soon enoughmotorsport71 will become famous soon enoughmotorsport71 will become famous soon enoughmotorsport71 will become famous soon enoughmotorsport71 will become famous soon enough
got it.

UPDATE:

No crashes, thugs and mayhem worked perfect for full 15 minute run. Did get an error with carcrews. They continued on playing as normal but once i killed them off the didn't respawn and garbage collection didn't grab them up. Also after that error I had to chase one clear from where i started, the safe house by Roman's Taxi Depot, clear to the Airport, so i assume after it errored the max poll radius become inop? Also file logs were off.

SHDN:
2010-08-09 23:39:22 - Initializing ScriptHookDotNet v1.7.1.5 BETA (GTA IV version 1.0.7.0)
2010-08-09 23:40:14 - Direct3D device created!

2010-08-09 23:40:14 - SEARCHING FOR SCRIPTS...
2010-08-09 23:40:14 - Loading scripts in Assembly 'scripts\AmbientWars2010.net.dll' ...
2010-08-09 23:40:14 - ...found script 'AmbientWars2010.AmbientWarsCarCrews'!
2010-08-09 23:40:14 - ...found script 'AmbientWars2010.AmbientWarsCarSelector'!
2010-08-09 23:40:14 - ...found script 'AmbientWars2010.AmbientWarsCommon'!
2010-08-09 23:40:14 - ...found script 'AmbientWars2010.AmbientWarsMayhem'!
2010-08-09 23:40:14 - ...found script 'AmbientWars2010.AmbientWarsPlayer'!
2010-08-09 23:40:14 - ...found script 'AmbientWars2010.AmbientWarsStreetThugs'!
2010-08-09 23:40:14 - DONE! 6 valid scripts found!

2010-08-09 23:40:14 - STARTING SCRIPTS...
2010-08-09 23:40:14 - INFO: Phone number checks are not available!
2010-08-09 23:40:14 - ...successfully started script 'AmbientWars2010.AmbientWarsStreetThugs'!
2010-08-09 23:40:14 - ...successfully started script 'AmbientWars2010.AmbientWarsPlayer'!
2010-08-09 23:40:14 - ...successfully started script 'AmbientWars2010.AmbientWarsMayhem'!
2010-08-09 23:40:14 - ...successfully started script 'AmbientWars2010.AmbientWarsCommon'!
2010-08-09 23:40:15 - ...successfully started script 'AmbientWars2010.AmbientWarsCarSelector'!
2010-08-09 23:40:15 - ...successfully started script 'AmbientWars2010.AmbientWarsCarCrews'!
2010-08-09 23:43:59 - Error during Tick in script 'AmbientWars2010.AmbientWarsCarCrews':
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at NativeInvoke.Invoke<int,int>(SByte* name, Int32 p1)
at Scripting.?A0x49ce9d88.RemoveGroup(Int32 )
at AmbientWars2010.AmbientWarsCarCrews.Maintain()
at AmbientWars2010.AmbientWarsCarCrews.CarCrewsTick()
at AmbientWars2010.AmbientWarsCarCrews._CarCrewTick(O bject sender, EventArgs e)
at GTA.Script.TryTick()
at GTA.Script.DoTick()
at GTA.ScriptThread.OnTick()
2010-08-09 23:58:08 - Direct3D device lost!
2010-08-09 23:58:08 - SCRIPTS TERMINATED!

Last edited by motorsport71; 08-09-2010 at 10:04 PM..
motorsport71 is offline   Reply With Quote
Old 08-09-2010   #152
Ironhide
- Ambient Wars Creator
 
Join Date: Oct 2009
Location: Texas
Posts: 210
Ironhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enough
k that's the type of error I'm looking for. I'll pass it on to Hazard. As I said before when you see that type of error, the script thread was aborted by SHDN as part of it. In this case, the CarCrews thread deleted a Group object after using Exists(Group) to confirm it was still valid, but Exists is only updated by SHDN once per frame for performance, so it means the result of the Exists(Group) = True was wrong / outdated. It told AW yes that is a valid object, but the game said, no, it's not. Kablam. It tried to perform an operation on an object that is now null. Anyway that's minutia.
Ironhide is offline   Reply With Quote
Old 08-09-2010   #153
motorsport71
Teach Me Wise Ones, Leave Me Alone Stupid Ones
 
Join Date: Dec 2009
Location: Pittsburgh
Posts: 161
motorsport71 will become famous soon enoughmotorsport71 will become famous soon enoughmotorsport71 will become famous soon enoughmotorsport71 will become famous soon enoughmotorsport71 will become famous soon enoughmotorsport71 will become famous soon enough
so once Hazard gets the next SHDN ready for another test will it be ran under this setup or are you going to make some changes before hand?
motorsport71 is offline   Reply With Quote
Old 08-09-2010   #154
Ironhide
- Ambient Wars Creator
 
Join Date: Oct 2009
Location: Texas
Posts: 210
Ironhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enough
There are no changes I can make that I can think of at the moment to prevent that problem in any way. I have to depend on functions to tell me the object is still valid, or not, and take action based on that, but in these situations the result I get is not actually valid and I have no way to determine otherwise.

The group object is central to car crews. It is the game object that ties peds together in a hiearchy of leader and followers and provides the logic to make that work, and it must be able to be fully garbage collected / destroyed / or confirmed released back to the game, otherwise it will eventually cause a memory leak and then things will go down from there. If I do think of a hack around it, which I've done on a number of things while waiting for an actual fix inside SHDN then I will but at this point I'll see what comes back.
Ironhide is offline   Reply With Quote
Old 08-10-2010   #155
motorsport71
Teach Me Wise Ones, Leave Me Alone Stupid Ones
 
Join Date: Dec 2009
Location: Pittsburgh
Posts: 161
motorsport71 will become famous soon enoughmotorsport71 will become famous soon enoughmotorsport71 will become famous soon enoughmotorsport71 will become famous soon enoughmotorsport71 will become famous soon enoughmotorsport71 will become famous soon enough
yeah, i thought about it my last post last night and realized that making changes wasn't necessary until you seen what a new SHDN did. I was a little tired at that point as well. Thanks for the explaination of how the Car Crews works, it gives me a better understanding of what's going on in the background.
motorsport71 is offline   Reply With Quote
Old 08-10-2010   #156
Ironhide
- Ambient Wars Creator
 
Join Date: Oct 2009
Location: Texas
Posts: 210
Ironhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enough
You bet. And frankly if we can reach a truly stable, fully garbage collected state then things can really get fun and grow over time because I could start to implement behavioral logic for crews, and anything else.

For example right now I have very basic AI logic now for crews, where as in previous project I had much bigger variety but the underlying stability and crash problems were to such a degree none of that could ever be fully realized or implemented.

But in a stable foundation, it could. Right now during the car crew maintenance cycle (Maintain) it does a number of things with all objects related to distance and dead checks, which is why you see them pop out of existence or blips change colors based on status.

But it also has a piece that detects if the crew has left the car. It will stay as is for now until we can run it for long periods of time stabily. but as soon as that is true, it could then kick off a behavioral logic branch to make them do all kinds of random shit. They could find the closest cop car and ALL focus fire on it, or find a hot dog vendor and rob his ass including me writing code to make the vendor put his hands up while a crew is pointing guns on him, or make them attack and kill simulated drug dealers or or or etc etc. And I could code that piece in such a way as to become a simulated AI object where you just pass a ped or group of peds to it and "it'll just do it".

Being able to reach that stage of being able to focus on such friggin cool possibilities is a central reason I have put so damn much effort into this monster. All the work up front is simply so I can get to that point and then the fun would really begin

Edited:

I'm going to experiment with creating a very basic AI object. Can't help it. That concept is just absurdly appealing to me.

Last edited by Ironhide; 08-10-2010 at 08:07 AM..
Ironhide is offline   Reply With Quote
Old 08-10-2010   #157
motorsport71
Teach Me Wise Ones, Leave Me Alone Stupid Ones
 
Join Date: Dec 2009
Location: Pittsburgh
Posts: 161
motorsport71 will become famous soon enoughmotorsport71 will become famous soon enoughmotorsport71 will become famous soon enoughmotorsport71 will become famous soon enoughmotorsport71 will become famous soon enoughmotorsport71 will become famous soon enough
i admire you passion and am truly hooked on this project. my wife laughs and shakes her head when she walks through the dining room and hears the Ambient screams and explosions. She works QA and understands completely what i am trying to help achieve here. When i get home tonight I'll see if your "Basic AI object" has been implemented or if Hazard has gotten something for you.
motorsport71 is offline   Reply With Quote
Old 08-10-2010   #158
Ironhide
- Ambient Wars Creator
 
Join Date: Oct 2009
Location: Texas
Posts: 210
Ironhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enough
heh well I shield my wife from the noise of War with 5.1 surround headphones with bass control. I've had her stand behind me a couple times and put them on for a second when showing something I did. I usually just hear "Good god" and they are handed back to me as she exits my office with a grin usually

Because SHDN was updated to use .NET 4.0, something that came with it was a new meta data system. Well, the objects wrapped by SHDN expose metadata properties. And they are totally dynamic, in that you can simply create a property on the fly and it attaches to the object and can then be accessed later.

This key ability is essential to my experiment. I've created an abstract AICore class and a AICoreCarCrew class that inherits from it and will do speecific things related to crews. I won't go into absurd minutia here and it's going to take some serious coding to pull it off, but imagine this:

During AW maintenance cycle (Maintain) : Crew.AI.Think()

Ironhide is offline   Reply With Quote
Old 08-10-2010   #159
motorsport71
Teach Me Wise Ones, Leave Me Alone Stupid Ones
 
Join Date: Dec 2009
Location: Pittsburgh
Posts: 161
motorsport71 will become famous soon enoughmotorsport71 will become famous soon enoughmotorsport71 will become famous soon enoughmotorsport71 will become famous soon enoughmotorsport71 will become famous soon enoughmotorsport71 will become famous soon enough
you, my friend, are the man. can't wait.
motorsport71 is offline   Reply With Quote
Old 08-10-2010   #160
Ironhide
- Ambient Wars Creator
 
Join Date: Oct 2009
Location: Texas
Posts: 210
Ironhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enough
Omg this may actually work lol... the first Crew.AI.Think() was just performed. The logic chose StealCar from the following quick enum I made:

Public Enum ActionTypes

''' <summary>
''' Signifies an object tested for metadata Action is a null object
''' </summary>
''' <remarks></remarks>
[Nothing] = -1

None = 0

'Single member actions when they have no group anymore
MemberStealCar = 1
MemberGoBerzerk = 2
MemberExplode = 3

'Group based actions
LeaderStealCar = 50
LeaderGoBezerk = 51
LeaderExplode = 52

End Enum

The logic chose a car near him... he ran away from the crew car they were given at the start, stole my car sitting outside the initial apartment spawn and he drove off at a high rate of speed....

This is going to be fucking sick.

Edited:
For clarity I of course have to code what each action actually is so for the action he performed was a basic scoop of nearby cars that are not required for mission but it was a 2 seater so he left his crew standing in the street like "yo wtf where you goin!" so I would have to add a large (huge) block of logic just to make it so the car chosen has enough seats for the entire crew and then each individual crew to get in the thing and make the leader wait on them to actually do that etc etc etc but it was a good first test just to see if such a thing is possible. It is

Last edited by Ironhide; 08-10-2010 at 03:07 PM..
Ironhide is offline   Reply With Quote
Old 08-10-2010   #161
motorsport71
Teach Me Wise Ones, Leave Me Alone Stupid Ones
 
Join Date: Dec 2009
Location: Pittsburgh
Posts: 161
motorsport71 will become famous soon enoughmotorsport71 will become famous soon enoughmotorsport71 will become famous soon enoughmotorsport71 will become famous soon enoughmotorsport71 will become famous soon enoughmotorsport71 will become famous soon enough
well, if the car crew leader jumped in and the rest of the crew stood there, maybe only one should get in and the others should get pissed off and start shooting at the car as it drives off and then become general thugs.

DUDE! HUGE NEWS! have to try again to recreate, but i was playing with last nights final build and I pulled up the car spawner, which i use ALL THE TIME, and we had problems. Today i was playing and i pulled up the car spawner and the game actually crashed the first time out. I thought that was wierd it crashed on pull up so i retried again, never using the spawner, and played for 23 minutes staight without a hickup! Now, I did get stars from time to time that caused the car crews to hesitate to spawn but all was good. will try to recreate.

Last edited by motorsport71; 08-10-2010 at 04:41 PM.. Reason: auto-merged double post
motorsport71 is offline   Reply With Quote
Old 08-10-2010   #162
Ironhide
- Ambient Wars Creator
 
Join Date: Oct 2009
Location: Texas
Posts: 210
Ironhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enough
Hmm that is very strange that it crashed with the spawner I'll have a look over it and see if anything jumps out at me.

Yep that's a good idea thought of something very close to that and a few other things earlier but don't want to get too bogged down yet into trying to implement extremely complex behaviors or it will simply take over at the expense of stability and testing, but I will definitely keep messing with it. The 1st run didn't actually use the entire crew it wound up sending in only the Leader because I had intended to do group actions but I didn't have time to code for a group so only the Leader was considered in Think. I'm currently making it so the entire crew will get processed but they will still get processed as indidivuals and not a collective but it's just to see results.
Ironhide is offline   Reply With Quote
Old 08-10-2010   #163
motorsport71
Teach Me Wise Ones, Leave Me Alone Stupid Ones
 
Join Date: Dec 2009
Location: Pittsburgh
Posts: 161
motorsport71 will become famous soon enoughmotorsport71 will become famous soon enoughmotorsport71 will become famous soon enoughmotorsport71 will become famous soon enoughmotorsport71 will become famous soon enoughmotorsport71 will become famous soon enough
Hehe... just had a 38 minute successful no problem full stability run based off last nights SHDN / Settings you gave me. I used the Car Spawner and everthing went great. Also, i noticed the car spawner not only resets the AW, but it also removes your wanted level. I don't know why i had problems last night? I have had two in a row good ones now. Maybe a reboot since then is the only change i can think of, but i reboot the machine before i play any game.
OH, also, Cops are spawning as Thugs... And due to the density of them i am not sure but i think when i kill one i get a star! Rogue cop lol! I also love the cops being targetted by the Mayhem. Thats fun when you are being chased and one explodes in front of you as you come up on it.

UPDATE: going to make another run

UPDATE: Made another run, 34 minutes no problems. Carcrews, mayhem, thugs all worked correctly with no errors. That makes 3 straight runs in a row without a crash or error. I am afraid to reboot my computer!

Last edited by motorsport71; 08-10-2010 at 09:38 PM..
motorsport71 is offline   Reply With Quote
Old 08-10-2010   #164
Ironhide
- Ambient Wars Creator
 
Join Date: Oct 2009
Location: Texas
Posts: 210
Ironhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enoughIronhide will become famous soon enough
There's a note about some of the changes in the readme file. Take a look. The player assist causes crashes so it is totally disabled that's why your car can get trashed and no ammo refills. I do have it making the player invulnerable though when toggled on and resetting that status when toggled off but there is no active player assist code in the player tick. It's all disabled at the moment.

lol don't fear the reboot. Right now there will be a random crash now and then. Could be within 30 seconds or 2 hours later. It's just a matter of time I think. But it is hugely more stable than ever in its history, so I am happy with the road it's on.

I noticed the cops becoming thugs too. One thing I never did was create a model exclusion list for Street Thugs. The validation checks it does on the Civs it evaluates for suitability of thugery is there as it was before but it does not have a model check in it. But I could create one for that too so it could be controlled if cops, or firemen, rescue workers, hookers, whatever, are excluded or not. I'lll eventually do that.

Also there is a sync problem that can occur with toggle states. Some times the key is missed in some scripts and not others, so that means some times when you kick on AW, 1 or more peices might NOT have kicked on, and then when you kick it off, those pieces that weren't kicked on might kick on.... I ran into this in the original project. I've ported over my sync solution and am testing it now to make sure it always forces the correct status of the system. Once I have that confirmed and everything is still stable I will upload you a new build.
Ironhide is offline   Reply With Quote
Old 08-10-2010   #165
motorsport71
Teach Me Wise Ones, Leave Me Alone Stupid Ones
 
Join Date: Dec 2009
Location: Pittsburgh
Posts: 161
motorsport71 will become famous soon enoughmotorsport71 will become famous soon enoughmotorsport71 will become famous soon enoughmotorsport71 will become famous soon enoughmotorsport71 will become famous soon enoughmotorsport71 will become famous soon enough
I did do another run, exactly 30 minutes, no problems. Perfect stablility. I did have a Thug cop jump on a scooter and chase me down. He was still a yellow blip. Now i have seen other thugs jump in and out of vehicles repeatedly without actually driving one, but this was a first. I checked around and there were no other cops. So i killed him and got 2 stars... So killing a Thug cop counts against you. That is kind of cool and you may want to consider leaving that in there. I also had a few instances where i used the Car Spawner and during the reset CarCrews turned to yellow thugs but continued driving. Didn't cause any issues.
motorsport71 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 02:37 PM.