|
Post by magitek on Oct 5, 2011 0:17:26 GMT -5
Alright that basically answered my question in full, thanks.. It is more or less how I imagined.
I can probably automate thugs to a much greater degree. To answer some of the issues:
Once hired, I can have them move to one of the players hangars that contain moths and board an available moth automatically, or if none exist, I can get them to buy one, calling a taxi or jumping into your moonmoth seat to get there.
During combat, if any of your thugs orders change to attacking you, I can force them to attack your target again. Also, if they are in the area, I will automatically dispatch them to aid you if they are armed and aren't carrying too many valuables.
As for their reliability, I can't vouch much on that department without rewriting their entire system. What I might do is introduce some leniency to make them more effective than typical AI.
Pilots and thugs should never get seriously stuck anymore, and I'm also going to try tackle the ever-overriding recharge order. I've already reinforced this a bit by introducing a shield regeneration mechanic for the AI; the slower the AI is moving, the more power that will be diverted to shield regeneration. It is now difficult to destroy anyone sitting on a lightwell if they are not defending themselves. The player benefits from this mechanic too but not nearly as much.
Pilots in combat should hopefully become more reactive when they are bumped, I'm testing if they fight better if I immediately re-issue the kill command (should basically allow them to fire a bit while whacking into walls..ultimately I want to tap into their turning speed and increase it while motionless.. but I can't figure it where the rotation data is, or how it is stored). With the shield regeneration in place it's not as much of an issue though, as any bump that stops them will end up negating quite a bit of shield damage.
From the sound of it, they mostly seem to suffer AI 101 issues and a lack of basic management. Sadly I don't think I can create new orders for players to use but I can continue to increase their intelligence to decrease the players workload.
For example if the player is hauling a decent amount of goods, I can assign any thugs without specific orders to escort you. The last thing you want to do is type out each individuals orders while you're under fire.
Although I am hardly prioritizing thugs the moment, I don't think it will be terribly difficult to make thugs less irritating while improving the basic AI.
If anyone has ideas as to what thugs should automatically do in given situations, or what they could be doing better, post about them and I'll see what I can do.
edit: I think I will also introduce insurance for thugs, this might help mitigate any losses while using them.
|
|
|
Post by riedquat on Oct 5, 2011 7:33:22 GMT -5
Dude... Where have you been all these years? ;D
|
|
|
Post by magitek on Oct 5, 2011 20:39:34 GMT -5
Dude... Where have you been all these years? ;D Mainly working on other games It's too bad I missed the modding peak of Hardwar(2004?) though. Random issue of the day: Although I now have the server running without crashing over 24 hours, I can see that enhanced2 and MSGC are clashing at some point; I am frequently waking up to a ghost town with dozens of moths flying around with no pilot.. I can only assume MSGC is 'cleaning' or ghosting whatever pilots enhanced2 is using to respawn police and faction guards..
|
|
|
Post by duncan on Oct 6, 2011 2:48:21 GMT -5
CheckPilotDead is the function in MSGC that initiates cut (and recycling) of dead pilots.
if (location == limboAddress){
How does enhanced create pilots?
|
|
|
Post by magitek on Oct 6, 2011 3:15:39 GMT -5
CheckPilotDead is the function in MSGC that initiates cut (and recycling) of dead pilots. if (location == limboAddress){ How does enhanced create pilots? Pretty sure it is tapping into legitimate channels to do so, now I know what happens when it runs out of pilot memory; enhanced continues to generate vehicles but is unable to generate more pilots to fill them, thus resulting in a lot of empty seats. What caused this: I fixed a problem in MSGC where the moth cleaner would actually clean the moths of joining players; the player is technically a ghost in limbo while setting up his name. In the rare occurrence that the cleaner passed over his data while he was connecting, it destroyed his starting moth. (This became readily apparent because my MSGC checks pilots more than a hundred times faster than default ..5 pilots every 25ms.) When I wrote the protection for this, I never really finished it because I needed to write a player/pilot data structure to collect information so I could actually tell if it was an unused 'Unnamed Pilot' ghost, or a new pilot connecting to the server(you can continually create these by going backwards and forwards on the netspeed selection, therefore fill the server up with pilots). I didn't get around to finishing the function and it was disallowing all pilot ghosting, this caused enhanced to continue to replace moths when there wasn't any available pilot memory to do so! Moral of story: failing to finish what you start can cost you a lot of time debugging. I think it's still possible that enhanced isn't compatible with re-using any old ghost, I'm really not sure.. only time will tell.. I would rather not just axe it, because it doesn't seem possible to generate moths using realtime memory editing.. I can't seem to get my hands on the enhanced source spawning stuff either. edit: Good news is, only 5 pilots got permanently stuck over a 12 hour period. I'm not positive as to what I will do with these guys, but at the moment I'm just blowing the poor bastards up. I think these are related to moths that lose their engine HP (which I can't find the memory for).
|
|
|
Post by reaxion2 on Aug 7, 2012 19:32:27 GMT -5
There are 2 trade lists, sales and needs. They are both in the Trade Centers extended data struct. You can figure out where it is in the save file by getting the hangar index (at position ee indicated in the hacking hardwar page). That is a word value (2 bytes) and the 0x1000 is a mask (subtract it and the remaining hex value is the actual index number). Next, there is 4 separate structs after the Version header( first 16 bytes). Each of the first 2 structs has room for 40 4 byte values. The first appears to be 27 reversed strings which I think are names for the structs they access. The second one is a continuation of the so-called hangar index (same mask of 0x1000), and these 27 index correlate to the rest of the save file structure. Then there are 2 tables, each having room for 400 4 byte values. The first table contains the save game address of each indexed struct. The second one contains the Size (in bytes) of the indexed struct. The first 128 values correlate with the indexed hangar data. The remaining 27 are various items like the messages, cargoes ( OBJN, OBJS (show as "NJBOSJBO") where OBJN (4 bytes) = the number of cargoes ( Fabien called them heaps of goods) and OBJS is where the actual cargo data is stored ("S" for struct?). Further verification was provided by the values at the end of the (reversed) name list. "emitxmittolp" would then be "time" (day value is stored here), "timx(time value stored here), and "plot" which seems to track plot messages , and sometimes there is a .gdv filename listed if you are using a version with the videos. By using these values the entire save file size is accounted for. The "gaps" in the table are accounted for by the other known data. There are 9 4 byte values at (oxDD0) ... number of moths, first moth offset in sav, moth list offset, number of hangars, Limbo! offset(1st "hangar"), hangar list offset, number of pilots, 1st pilot offset, and pilot list offset. The next 2 4 byte values so far as I have seen are always 0, the value at 0xDFC is the player pilot ID (last game memory offset I believe). Note that "non-indexed hangars" have NO extended data. Also, "pmsg" correlates to the pilot message data ( same structure you documented.), and monorail stuff is right after cargos. Maybe 3 types of memory slots ( haven't figured out the structure of any of those) , 6 art(iculation?), etc. If you get any struct data for any of that stuff, please let me know.
Edit: I think I have verified my ideas by also using ollydbg to find various numbers hard_coded into the .exe file. I can send you a copy of my udd file (generated by ollydbg ) containing the notes I have made in my explorations of the HardwarW file. ( Just rename the one you already have to something else temporarily, and put mine in the folder your HardwarW.udd is. Olly will automatically load it, and you can then see if anything I have found helps you out.)
|
|
|
Post by reaxion2 on Aug 7, 2012 19:58:12 GMT -5
You leave MSGC running? I use it once every few hundred hours unless there is a queue.
If you could see your way to sending me a copy of your MSGC source, I'd appreciate it. It sounds like you are waaaaaaaaaaaaay advanced in your programming skills compared to me. I just finally got misopians source code running, but still have some fixes to make just to get the basics working with VStudio 2008. I am recoding HardLook as well, to sort of combine the "live" and "save" editting in one app. I have a few other ideas as well. ANY hardwar file structure data would help me out, guys. BMP, SPR, WLD, etc?
|
|
|
Post by Pilot on Aug 11, 2012 12:26:34 GMT -5
Try PMing or Emailing Duncan. if his email isn't visible I could send him one.
|
|
|
Post by duncan on Sept 1, 2012 4:45:50 GMT -5
|
|
|
Post by Enders_pride on Jun 26, 2015 5:33:46 GMT -5
@ riedquat Misplaced Optimism?!? lol
Magitek, you ever go any further on this? ideas all sound good, and im always on the look out for the best upgrades to the game.
|
|
|
Post by riedquat on Jun 26, 2015 10:45:47 GMT -5
@ riedquat Misplaced Optimism?!? lol Magitek, you ever go any further on this? ideas all sound good, and im always on the look out for the best upgrades to the game. Ugh... I can't remember what I took for breakfast so it can take a while to me to figure out what are you referring to... Edit: still not sure waht are you referring to but the re-read made me laugh hard... I love my Ph2!
|
|
|
Post by magitek on Jun 30, 2015 22:33:20 GMT -5
@ riedquat Misplaced Optimism?!? lol Magitek, you ever go any further on this? ideas all sound good, and im always on the look out for the best upgrades to the game. I did, but eventually something had caused the server to start crashing over time. I abandoned the project because I couldn't track down the issue. Most of the work I did was trying to get the police system to work better and trading to work both ways appropriately. Unfortunately, at the rate of progress I was making it probably would've been quicker to re-write the game in Unity. It's possible I might pick up Hardwar again but right now I'm working with the (relatively) new Battlezone 1.5 patch.
|
|
|
Post by cadaverine on Jul 12, 2015 20:33:18 GMT -5
Wait a second. Someone else plays both BZ and HW? What other cult classics are you into?
|
|
|
Post by Denacity on Jul 13, 2015 5:56:58 GMT -5
My biggest pet peeve with Duncan's latest version of MSGC is how the Police are handled (I have this option turned off in my server). The Police basically do nothing but use up all the moths in DT/Highrise. They never upgrade or buy weapons so they die without ever killing anything. It also bugs me that they use whatever moths they can buy instead of just Police moths.
Magitek, would it be possible to add a function to MSGC that basically just spawns police moths, fits them with standard gear, orders the Police in them then they go on their marry way? This would circumvent Duncan's option of forcing the players to supply the moth hangars, but I think it's a better solution if you want to have the Police in MP games.
The idea is that this would work fine without enhanced, since UIM06 is known to run a lot longer without it.
|
|
|
Post by magitek on Aug 9, 2015 0:25:03 GMT -5
My biggest pet peeve with Duncan's latest version of MSGC is how the Police are handled (I have this option turned off in my server). The Police basically do nothing but use up all the moths in DT/Highrise. They never upgrade or buy weapons so they die without ever killing anything. It also bugs me that they use whatever moths they can buy instead of just Police moths. Magitek, would it be possible to add a function to MSGC that basically just spawns police moths, fits them with standard gear, orders the Police in them then they go on their marry way? This would circumvent Duncan's option of forcing the players to supply the moth hangars, but I think it's a better solution if you want to have the Police in MP games. The idea is that this would work fine without enhanced, since UIM06 is known to run a lot longer without it. I really wanted the police working actively in my game so I share your frustration about them. I think in order to actually *spawn* police, you need to usurp an active moth, which is why Duncan's works how it does. There's no known method to insert a new moth into the game that I know of. But I'm fairly sure you can outfit them, either by forcing the police to purchase parts, or by memory editing their active moth. Unfortunately it's been a long time since I worked on Hardwar or MSGC so I'm afraid I'll be of little help. Wait a second. Someone else plays both BZ and HW? What other cult classics are you into? Probably all of them, so long as you can mod them in some capacity!
|
|