The goal of this mod is to bring back the units from the original Homeworld into the Homeworld 2 engine, with high quality texture and polycount detail. The campaign and animatics from the original game will also be included.

  • View media
  • View media
  • View media
  • View media
  • View media
  • View media
RSS feed Report content Battle damage and Fuel Auto Docking for AI (view original)
Battle damage and Fuel Auto Docking for AI
embed
share
view previous next
Share Image
Share on Facebook Tweet Email a friend
Embed Image
Post comment Comments
Mr.Thi
Mr.Thi

Ehm ... I like the Idea and all this. But .. have you checked this with let#s say ... 200 Fighters?

I would think this might cause heavy lag or stuttering.

At least that's what I remember when the last one tried this.

Reply Good karma Bad karma+1 vote
Krnt Author
Krnt

Yeah, its a large lag and stuttering source, and even more since our fuel script is two or three times longer, but I could optimize it to allow the original HW1 unitcap(80f, 50c) with between 2 AI players and keeping around 60 fps in my old Phenom II machine, I bet nowdays CPU would have less problems, still 1/2 and 1/4 HW1 unit caps are available.

Also we it will be optional in the gamemode, so you could get better performance.

Reply Good karma+1 vote
Aliah
Aliah

Wouldn't think you'd need it to run every second, maybe once every twenty seconds, and not in-combat. Optimization is something Homeworld 2 almost demands, so the most you can get out of it is the best route.
Hopefully the remakes will take care of that, and let the game use your PC to its fullest finally.

Reply Good karma Bad karma+1 vote
Krnt Author
Krnt

I think you are right, I will try to optimize it better, I have some other ideas aside from increasing the check interval, right now I checking for 2 sec to look if it works correctly. I don't want to raise it too much because it could make the Kadesh swarmers work incorrectly.

In HW1 the interval was 1/16 of a second and the fuel consumption was twice during combat, I wish this was that efficient.

Reply Good karma+1 vote
Mr.Thi
Mr.Thi

HW1 had a lot of mechanics that where superior to HW2 ones. Comparing the Performance and Physics HW1 was much better. The Bullets where much better ... in HW2 every Bullet is basically a homing missile with a chance to miss... In HW2 hitting the target was more realistic. If a fighter was moving short before the bullet hits, it simply won't hit. In HW2 ... the shot will follow the fighter. I also think this mechanism made battes much more CPU intense. HW1 was able to handle way more ships in Battles then HW2 can.

And the whole harvesting and asteroid system ... was much better... Well I shuold stop now :-P

Reply Good karma Bad karma+1 vote
Krnt Author
Krnt

Yeah I understand what you mean, and I wish the HW Remastered from GBX could give us that option, seems like HW2 had lazy development.

About HW2 bullets they are more like beams with a bullet animation, which is a silly solution if you ask me, also seems that the code is very inefficient having problems when managing several slow bullets from many turrets.

Reply Good karma+1 vote
Mr.Thi
Mr.Thi

Jea... Well they use the same system with Dawn of war 1 and 2. But the really ugly part is, that the bullet will always follow it's target to hit if it was determined to Hit by engine. (At least if target random will not lead to empty space.) I noticed that the first time when I managed to jump a ship with a short range jump and a good amout of bullets chaned their direction to hit at new destination.

^^ ... HW Technerd discussion *Like*

Reply Good karma Bad karma+1 vote
Guest
Guest

This comment is currently awaiting admin approval, join now to view.

HW_Lover
HW_Lover

You can try X system

Reply Good karma Bad karma+1 vote
Mr.Thi
Mr.Thi

X System is cool, but it's load is enourmous and I'm pretty sure it would be much bigger then the load their script is creating, if you use it on many ships.

I tried to control ship speed with X-System for my EVE mod... And the results where very nasty. It's simply not efficient for many ships.

Reply Good karma Bad karma+1 vote
Krnt Author
Krnt

I read that thread on Relic News Forums, maybe it could work for something else in our mod, like Mr Thi said, it could be worst with this amount of ships.

Thanks for the suggestion.

Reply Good karma+1 vote
Guest
Guest

Just pay attention not to abuse it, then it won't make the game very laggy. But another problem just came into my mind which is, did you tested whether the script still works after loading a saved game?

Reply Good karma Bad karma0 votes
HW_Lover
HW_Lover

well it's me, forgot to log in...

Reply Good karma Bad karma+1 vote
23-down
23-down

every second may be to much. Not sure but it could drain on the performance if there are 100 of squads on a map - every 5 or 10 seconds should be fine as well.

Reply Good karma Bad karma+1 vote
Krnt Author
Krnt

After a lot of test I found that increasing the script interval, didn't help at all, because with high amount of ships that the script needs to work in the same frame sometimes is too big and too noticeable.

So I'm going to try to divide the script load over time.

Reply Good karma+1 vote
Hell_Diguner
Hell_Diguner

Maybe you could take a look at the script(s) in Complex which control those automatic repair drones.

Or perhaps look at the scripts in the Flagships mod (all strikecraft are automated, construction, repair, attack, everything).
Angelfire.com

I discovered this page from a link on the Karos Graveyard: Hw2wiki.net
Clicking on "Kadeshi Fuel Pod Management Script by inquisitiveidiot" will take you to the first website I linked. I see there was an autodocking script from Le Sun Tzu as well, but the downloads are dead links.

Reply Good karma Bad karma+1 vote
Mr.Thi
Mr.Thi

You could manage them as a Stack or something like that. When doing the scripts for the Sectore mode I divided most otherwise for or while operations in function to be called inside a Rule wich increases an index by a setable amout to work on arrays.

As you have changing entities you could either collect the new array while processing an old one over time as a rule. or you could create a Stack with Entities wich are removed if killed.

I always failed at that because I was not able to get individual ships on runtime in an efficient way.

Reply Good karma Bad karma+1 vote
Raygoza
Raygoza

All I know is that Kadesh swarmers has less fuel compared to other raceĀ“s strike craft, could be solved by making the script check the fuel amount on swarmers more often in comparison with other strike craft.

Reply Good karma Bad karma+1 vote
Krnt Author
Krnt

Yeah, but for that I would need to separate the fuel script in a function for every class (which is exactly what I want to do now) for them to use different intervals for each class.

Lets see if I can get it working as I want in the end.

Reply Good karma+1 vote
Hell_Diguner
Hell_Diguner

Some efficient script triggers "I'm low on health" dialogue and FX. It'd be nice if this was a call you could hook into.

///further investigation///
Hw2wiki.net
Search for "hea" has 6 results for "health" and 1 for "heavy." That lead me to references like StatusCriticallyDamaged which (apparently) is defined in data\soundscripts\speechlogic\status.html

I haven't (yet) taken a programming course, but that looks like a promising starting point for a dock-on-low-health script.

Reply Good karma Bad karma+1 vote
Krnt Author
Krnt

Thanks I forgot about those, I wish their values were a little bit higher since at 55 health when the script is triggered they easily get killed when RTB.

Also I used the same script for both fuel and damage, I just needed to add a simple line, two kill with one shot.

Reply Good karma+1 vote
Hell_Diguner
Hell_Diguner

Well, there's a StatusTakingHeavyDamage.

Reply Good karma Bad karma+1 vote
Post a comment

You are not logged in, your comment will be anonymous unless you join the community. Or sign in with your social account:

Description

The AI will take care of its strikecraft by checking the fuel and health every second, and sending them to docking or latching in the nearest support ship.

Original Fuel Script by Pulsar Magic.

Details
Date
By
Krnt
Size
1920×1080
Options
URL
Embed
Embed Thumb
Share
Feed
RSS feed