Well you don't see things that don't crash the game/script.
The point is to see if the game is entering that specific 'if' condition. Then you can work out where the problem is more exactly.
Well you don't see things that don't crash the game/script.
The point is to see if the game is entering that specific 'if' condition. Then you can work out where the problem is more exactly.
mololu! I have forced it to work! However I have understood that took for an example not a correct code from Complex!
This code is used only for one subsystem on one hardpoint! The CPU-player always built only the first subsystem from the list!
And the second subsystem did not build in general!
It is necessary to create a new code with the Random factor of for both subsystems!
Code should be it is approximately similar to it:
Code:if NumSquadrons (VGR_ALKHALID)> = 1 then if numRUs> 500 then SubSystemDemandSet (KINETICCANNON, 1.3) SubSystemDemandSet (KINETICCANNON1, 1.2) SubSystemDemandSet (KINETICCANNON2, 1.1) SubSystemDemandSet (KINETICCANNON3, 1) end if numRUs> 800 then SubSystemDemandSet (DOUBLEKINETICCANNON, 0.9) SubSystemDemandSet (DOUBLEKINETICCANNON1, 0.8) SubSystemDemandSet (DOUBLEKINETICCANNON2, 0.7) end end
I do not understand while as works multiplier above than 1.0?
In what sense of it?
I do not understand in what a difference between Set and Add?
SubSystemDemandSet(KINETICCANNON, 1.3 ) and SubSystemDemandAdd(FRIGATEPRODUCTION, 3 )
----------
Last edited by mickey; 14th Oct 10 at 2:00 PM.
Add increaces the existing demand (i.e. existing demand + value you give) while set sets an absolute value (original value is overwritten).
Add is used to increase the value as more ships are demanded (i.e. we want more frigates, add more demand to frigate subsystems) while set is used for specific subsystems to set a value which isn't to be changed by anything else (i.e. if we have shipA, always build subsystemX)
Dunno on the > 0 issue though. I've only ever used a value of 10 to force it to build the stuff I want it to, never gave it much thought.
Very interesting on the one hardpoint only thing. Didn't know that! Glad it works though!
Yes it works on 100 %
You can use it! (Last code for Battlecruiser)
However always is under construction there will be only one subsystem, (the first of the list)
For now I will try to create a new code!
Tell please what designate negative values in a code with threat level?
How to understand it <-5?
For Example:
if (BuildShipHasSubSystem( buildShipId, HYPERSPACE ) == 0 and UnderAttackThreat() < -5 and
BuildShipCanBuild( buildShipId, HYPERSPACE) == 1) then
aitrace("Build BC Hyperspace")
BuildSubSystemOnShip( buildShipId, HYPERSPACE )
if (BuildShipHasSubSystem( buildShipId, SPECIALPRODUCTION ) == 0 and
(UnderAttackThreat() < 25 or numRU > 2500) and
BuildShipCanBuild( buildShipId, SPECIALPRODUCTION) == 1) then
aitrace("Build BC SpecialProduction")
I honestly don't know how underattackthreat works exactly. I *think* (note: i'm really not sure of this) that it's the threat the player or enemie's fleets pose to the AIs fleet, i.e. if they have many fighters and you have few the threat will be large. If you have many fighters and they have few it will be small.
But I really don't have the faintest clue how it works. If what I say is true then, "UnderAttackThreat() < -5 " means that the AI fleet is better than the enemy fleet by at least -5 (everything -5.1 -6 -7 -8 -9 and so on) would be part of that. But again, I don't know how it's calculated so it's just a guess.
In summary:
UnderAttackThreat() > 0 (more than 0) means: the AI fleet is not good enough
UnderAttackThreat() < 0 (less than 0) means: the AI fleet is better than the enemy fleet
I managed to force CPU-players to build production and weapon subsystems!
Now it will be necessary to create a code which to force to retire production-subsystem if the any Battlecruiser is have any weapon subsystem!
My Battlecruisers can carry only one weapon-subsystem and after building of a weapon-subsystem the production-subsystem it is not necessary any more!
Somebody can help to create to me such code?
In original game there is a code for Vgr_Carrier for dismantling of production subsystems
Code:function CpuBuildSS_RetireVaygrProductionSubSystems() local numCarriers = CarrierCount() for i=0, (numCarriers-1) do local carrier = CarrierAt( i ) local productionId = CarrierProductionSubSystem( carrier ) if (productionId ~= 0) then local ssdemand = SubSystemDemandGet( productionId ) --~ local count = NumSubSystems(productionId) + NumSubSystemsQ( productionId ) --~ if (count > 1) then --~ ssdemand = ssdemand - 0.5 --~ end -- if the demand for this subsystem is low and we already have one of these -- elsewhere then get rid of it if (ssdemand < 0) then sg_retireCountCheck = sg_retireCountCheck + 1 if (sg_retireCountCheck >= 2) then aitrace("VaygrCarrierRetire: Dem:"..ssdemand.." Count:"..sg_retireCountCheck ) -- retire this subsystem RetireSubSystem( carrier, productionId ) -- should replace with something right here sg_retireCountCheck = 0 return end else sg_retireCountCheck = 0 end end end end
It can be possible to use it?
WOW this mod is very impressive!!! By far the best ive seen in a while.
Thanks, I long try
The help with dismantling of subsystems is necessary!
Can't wait for a update, i wish i could mod and make scripts...![]()
My work is surprisingly slow!
More 4 years I expect the help!
It is very a pity to me (
R/L is catching up with me, and I can't write or test scripts as much as I ought to.
Destroying things is easy.
Creating things is hard.
Creating things in order to watch them explode is just plain fun.
Explosion Damage Script, Scripting Tutorial
I will necessarily finish the my work, but it will be not fast
Work in progress...
Uploaded with ImageShack.us
Now I want will return to theme Hive/Drone frigate.
I have created a new model of this vessel and drones for this unit.
For use of this frigate I am going to use heavy scripting and I try to create sphere formation around motherfrigate.
(Similarity of Drone Frigate from hw1)
Tell, there is a way to force Drones is in parade formation thus that could shoot in the near target (rotating and shooting)?
I spent some experiments and at me it is impossible to make it.(
May be Probably to create certain style of attack at which drones will remain in parade formation and will be capable to shoot?
Also I tried to clean "CanAttack" in *ship a file for drones and and tried to use Turrets which are capable to attack the targets when the this vessel has Defense Tactic.
(For Example DefenseField Frigate it is capable to shooting the purposes but thus no has in *ship a file "CanAttack" ability)
The test has shown to me that during parade formation the weapon of any unit is not capable to shooting!
Only having begun movement (Move Command) Turrets is capable to begin shooting.
How to force unit to shooting the enemy being in parade formation?
How you think it probably?
Who is capable to help and create to me difficult scripting for such unit?
![]()
Last edited by mickey; 7th Jan 12 at 6:13 AM.
Is this available to try out yet?
if so where?
@Relic: Buy yourselves back from THQ and make HW3 already.
Mickey would you like some lovely projenitor models ive done? free of charge, i have watched this and you do do alot of work. The only reason i think you dont get alot of attention is projenitor mods have been done so many times. Is there anything i can play ?
----------
Images
The bottom picture contains the attack bomber and two corvettes called a splitter and flanker which are based on the mover chassis. there is also a half finished frigate at the bottome which is loosely based on the attack fighter mixed with the destroyer. if you want some better pictures just ask![]()
Work in progress.Is this available to try out yet?
if so where?
I think 90 % of my ideas is executed.
Now I have stumbled on one problem.
CPU-Player of progenitor race never uses Hyperspace for attack.
I have learnt that the problem is in Hw2.exe, but today nobody is capable to help me.
Thanks, but I never saw good Progenitor models.Mickey would you like some lovely projenitor models ive done? free of charge, i have watched this and you do do alot of work.
Also models without textures for me do not represent any value.
I do not suffer from absence of attention. I do this work for myself.The only reason i think you dont get alot of attention is projenitor mods have been done so many times. Is there anything i can play?
Also I wish to tell that Homeworld2: EVOLUTION - is not only Progenitor mod.
I create new modernisations for all races simultaneously.
If I manage to solve problem AI-Hyperspacing for Progenitor race then I think that soon there will be my release.
mickey, I haven't looked @ this in a while...but it's...well...GREAT! TOTALLY AWESOME MOD, MAN! BTW CHECK YOUR PM.
Release hw2's source code already!
Thanks, I try... Only very long (
Experts in area scripting are necessary to me
Mickey, I think the problem is because the Pogenitor race was designed to be complete under control of the computer player. maybe you can use what the HWUniverse team has done where all the races are "Hiigaran" and you can choose from there?
10% of life is what happens to you and 90% is what you DO about it
No, the problem, funnily enough, is that the list of "which ships can use hyperspace to attack" is HARDCODED...
Not by race, but by SHIP. So only hgn_battlecruiser and vgr_battlecruiser (and any ships that come with them) will attack via hyperspace.
Speaking of which, if anyone knows how we may overcome this, we are seeking assistance ...
It is exact!Originally Posted by Dim@
All vessels capable to use the Hyperplace For attack or for movings on maps, are written down in the list located in hw 2. exe.
Today only two ships (if have onboard module HYPERSPACE) are capable to use Hyperspace Jumps.
Hgn_Battlecruiser and Vgr_Battlecruiser.
Progenitor is founder of Hyperspace Technologies and it should use Hyperspace! It is necessary.
If to solve a this main problem, desirable without crack hw 2. exe, then it will be fast ( I think month or maximum two months later) my release.
Today it a main problem for me...
Well relic haven't released the source code. So I don't know where you can go with that.I have learnt that the problem is in Hw2.exe
Uploaded with ImageShack.us
Uploaded with ImageShack.us
Uploaded with ImageShack.us
New video here:
http://www.youtube.com/watch?v=A2bjh...52AUAAAAAAAAAA
Work in progress...
CPU-Player of Progenitor race almost it is completely finished.
But Today I have the main problem!
CPU Progenitor Player do not use Hyperspace For attacks as it is done by the basic races.
I have found out that all AI-ships capable to use the Hyperplace For attack or for movings on maps, are written down in the list located in hw2.exe.
Today only two ships (if have onboard module HYPERSPACE TypeString) are capable to use Hyperspace Jumps.
Hgn_Battlecruiser and Vgr_Battlecruiser.
Progenitor is founder of Hyperspace Technologies and it should use Hyperspace! It is necessary.
If to solve a this main problem, desirable without crack hw2.exe, then it will be fast (I think some months later) my release.
People, I hope for your desire to help me if you do not know as to solve a problem it does not mean that you cannot help me.
Only try to Help me to find the person capable to force a new race to use Hyperspace.
If you wanted to use hyperspace tactics on the new ships, you could possibly rescript the AI files to not use that list. That is not a five minute job though, and you may have to manually script the tactic from scratch.
#129
Amazing stuff, bro!
HWSHOTS | JST-ONLINE | HOMEWORLD ARCHIVES | CROSSFIRE
TEH ALL POWAFUL "PLEASE MAKE HOMEWORLD 3" PETITION
NEWS! "hwaccess.net" and related sites have a new home at
www.homeworldaccess.net. Still WIP.
What do you have in view? I have badly understood you.If you wanted to use hyperspace tactics on the new ships, you could possibly rescript the AI files to not use that list. That is not a five minute job though, and you may have to manually script the tactic from scratch.
I think that the person well owning lua-scripting is capable to solve a problem without crack
hw2.exe
Will create for example list Progenitor ships which to use Hyperspace Jumps under certain conditions.
At least I hope for it.
It would be very difficult.
I know people have thought before about re-writing the hardcoded AI behaviour from scratch.
I'm not sure if anyone has ended up doing it.
I think there are two ways:
1. Crack of Hw2.exe
2. Use of magic scripts
Any variants.
Dim@ you informed me that Chinese mod already used crack of hw2.exe
Really this terrible action?
PS: It can be possible to try to ask Relic to solve this problem?
I would be interested in rewriting the AI from scratch as i need to for my own mod and i need to learn AI. If you help me learn the AI for a few weeks mickey, i will help you with you goal, as i need to rewrite the AI aswell, and i think we need the same thing.
Has badly understood your thoughts.
List extracted from hw2.exe:
We see only two ships capable to use Hyperspace for attack or movement (if onboard there is module HYPERSPACE TypeString)Code:<Class(%s) active(%d) inc_queue(%d) CpuPlayer ClassifierMode eMaxUserCount eMaxCount eGoodRepairAttackers eNonCriticalSubSys eSubSystemAttackers eShield eCapture eHyperspaceGate eSalvageDropOff eNonThreat ePlatform eCapital eCorvette eFrigate eFighter eAntiFrigate eAntiCorvette eAntiFighter eScout eDropOff eBuilder eRefinery eCollector eMotherShip numQueueOfClass numActiveOfClass classAt classSize isOfClass AddClassName AddToClass HYPERSPACE VGR_BATTLECRUISER HGN_BATTLECRUISER CpuCommon cpuComponents CpuCommon CpuFleetCommand FCStateMachines m_haveBeenAttacked m_attackNowFlag cp_overrideChooseEnemy cp_maxGroupValue cp_maxGroupSize cp_initThreatModifier cp_forceAttackGroupSize cp_attackPercent cp_minSquadGroupValue cp_minSquadGroupSize cp_builderDefPriority cp_refineryDefPriority cp_motherShipDefPriority cp_dynamicMergeDistSq cp_groupMergeDistSq AttackNow called! CpuFleetCommand UnderAttackThreat UnderAttackValue UnderAttack LastTimeAttack HaveBeenAttacked GetChosenEnemy AttackNow CAPSHIPPRODUCTION FRIGATEPRODUCTION BCIONBEAMTURRET HEAVYFUSIONMISSILELAUNCHERBC Enemy Info player_total player_max player_min player_all player_ally player_enemy Player_Self Player_IsEnemy PlayersMilitary_AntiFrigate PlayersMilitary_AntiCorvette PlayersMilitary_AntiFighter PlayersMilitary_Threat PlayersMilitary_Total PlayersMilitary_Frigate PlayersMilitary_Corvette PlayersMilitary_Fighter PlayersUnitTypeCount PlayersMilitaryPopulation PlayersPopulation PlayersAlive PlayersTotal
HYPERSPACE
VGR_BATTLECRUISER
HGN_BATTLECRUISER
Also we see only 4 subsystems (TypeString) which CPU-Player attacks, use bombers.
CAPSHIPPRODUCTION
FRIGATEPRODUCTION
BCIONBEAMTURRET
HEAVYFUSIONMISSILELAUNCHERBC
I wish to add only the ships for AI-Hyperspacing and subsystems for AI-Attacking!
How i can do this?
You are capable to help me using scripting?
Any variants
Last edited by mickey; 16th Apr 12 at 11:00 AM.
Maybe pretend other ships are HGN_battlecruiser somehow? Like, tell the game that KPR_BATTLECRUISER is actually a HGN_BATTLECRUISER somehow?
You suggest me to rename Kpr_Dreadnaught for example in Kpr_Battlecruiser?
So I understand you.
I thought of it before, but I think that in this case Prefix "KPR _"
Will not allow to solve a problem because in list located in hw2.exe are specified concrete units :
Code:VGR_BATTLECRUISER HGN_BATTLECRUISER
Nah, i mean, somehow trick the game into thinking KPR_DREADNAUGHT is HGN_BATTLECRUISER for the hyperspace stuff. I have no idea how though... :/
No, name KPR_DREADNAUGHT did not exist at all anywhere in original game.
In my case this name has been created only by me.
For this reason CPU-Player in any way and anywhere in hw2.exe does not define unit named KPR_DREADNAUGHT.
Yes this unit has been added by me in classdef.lua and has a class [eBattlecruiser], however for AI-Hyperspacing it has no obvious result![]()
That was his point, Mickey. If the KPR_DREADNAUGHT does not exist in the original game, then write the script so that all hyperspace effects are defined as HGN_BATTLECRUISER, rather than a nonexistent KPR_DREADNAUGHT.
For some odd reason, I surmise that I won't be understood to the extent that I'd like, but alas, 'tis no matter.
Imagine the whole world, summarized in song:Pick a little, talk a little;
Pick a little, talk a little;
Cheep cheep cheep;
Talk a lot, talk a little more...
"Yeah, sounds just about right."
The thing is, you can't do that.
It's not about hyperspace effects, it's about CPU player's use of hyperspace to attack.
And the CPU players are hardcoded to only use hyperspace if the attack wave has either a Vgr_Battlecruiser or a Hgn_Battlecruiser ...
There's no way to script it to "pretend" that one ship is another unfortunately.
We try to use functions SobGroup_EnterHyperSpaceOffMap () and SobGroup_ExitHyperSpaceSobGroup () in Complex forum.
Who can help join please http://complex.mastertopforum.com/vi...?p=44481#44481
Some sketches...
Last edited by mickey; 17th May 12 at 7:36 AM.
Hey Mic are you still alive over there? Id like to help if i could if you have need of me that is.
Where I can download this mod pls. answer
Last edited by mamelux; 26th Sep 12 at 4:34 AM.
Hey Mickey, this is coming along really well. Nice work.
Peoples. I have moved to other Big city (Saint-Petersburg), it was difficult to me to find work. Sometimes there was no money even on my meal. Also I compelled to rent a room and it costs 400$ every month.
I did not manage to find work with a free time and now I work 5 days in a week till the late evening to be capable to pay the room and to have money for a life in another's big city.
For this reason there were no advancements several months.
Do not worry! I continue to do this work, only now I have not enough time. Today I cannot solve main and last problem!Progenitor CPU-Player never uses Hyperspace Jump.
Today the person capable to edit Homeworld2.exe - file is necessary for me.
Everyone who wishes to help me, should try to find to me such person.
There are currently 1 users browsing this thread. (0 members and 1 guests)