Homeworld 2 Complex Forum Index
 Portal •  Blog •  Album •  FAQ  •  Search  •  Memberlist  •  Usergroups   •  Calendar   •  Register  •  User Panel  •  Log in to check your private messages  •  Log in
  FlashChat  •  Statistics  •  Links  •   Downloads  •   Comments to your karma  •  Toplist  •  Guestbook  •  Recent topics  •  Voting forum
Playing with 8.09 - adding new tactical bonuses to the game
Users browsing this topic:0 Registered, 0 Hidden and 0 Guests
Registered Users: None


 
Post new topic   Reply to topic    Homeworld 2 Complex Forum Index -> General
View previous topicEmail to a Friend.Users who have viewed this topicSave this topic as a txt filePrintable versionLog in to check your private messagesView next topic
Author Message
Baudolino

Captain
Captain




Gender: Gender:Male

Joined: 25 May 2011
Posts: 172
Baudolino is offline 







norway
PostPosted: Wed Aug 31, 2011 4:06 pm    Post subject:  Playing with 8.09 - adding new tactical bonuses to the game
Description: Also some tinkering with power
Reply with quote

I wrote in new abilities in destroyers that were supposed to buff frigates in the formation.

However i`m having trouble finding the proper commands.

"OwnShipsInRadiusExcludingThisShip"
"OnlyThisShip"

What other commands are there? I`ve tried a bunch of my own combinations, but i`m having trouble ensuring the buff ONLY affects Frigates.

Right now DDs boost each other and any other ship in vincinity.

TWO PROBLEMS:
1. How to i limit the Buff to ONLY frigates?
2. How do i ensure that Frigs can only receive buff from a SINGLE source and all other
sources are ignored?

Is the above even possible?

I was looking at maybe imbuing formations themselves with bonuses, but this doesn`t seem possible. So i went on to try limiting the Buff now generated by my DDs


AddShipMultiplier(NewShipType, "WeaponAccuracy", "OwnShipsWithinRadiusExcludingThisShip", "Linear", 1.15, 1.15, 4500)

In the above string it seems i can replace "newshiptype" with anything i want WITHOUT having any effect.
"weaponaccuracy" i can replace with any effect i want
"ownshipswithinradiusexcludingthisship" seems to have few alternatives?
"Linear" - what does this mean?
1.15, 1.15, 4000 - the latter is the range of the effect and one of the others is the percentage modification, but what is the last one?


Last edited by Baudolino on Thu Sep 01, 2011 2:22 pm; edited 1 time in total
Back to top
View user's profile Send private message
Sagyxil

Content Admin
Content Admin




Gender: Gender:Male
Age: 34
Joined: 27 Jan 2009
Posts: 2443
Sagyxil is offline 
Post Vote: User is appraised 2.75 out of 5
Location: Western US
Interests: Programming, 3d modeling, gaming
Occupation: Student



usa
PostPosted: Wed Aug 31, 2011 4:45 pm    Post subject:  
Description:
Reply with quote

Quote:
What other commands are there?

  • ThisShipOnly
  • AllShipsWithinRadius
  • OwnShipsWithinRadius
  • EnemyShipsWithinRadius
  • AllShipsWithinRadiusExcludingThisShip
  • OwnShipsWithinRadiusExcludingThisShip
  • EnemyShipsWithinRadiusIncludingSleeping - All enemy ships including ships in hyperspace (and possibly docked ships as well)


Quote:
Is the above even possible?
Not using the built-in multiplier system. HW2 wasn't really intended for these kinds of things. Its an all or nothing deal.

You can fake it though, using the a scripting system like Complex's efficiency system script (efficiency.lua), however, since HW2 makes it a pain to script for individual ships ( Evil or Very Mad ), you'll probably have to use the functions from sobgroupfunctions.lua.
Back to top
View user's profile Send private message Send e-mail
Baudolino

Captain
Captain




Gender: Gender:Male

Joined: 25 May 2011
Posts: 172
Baudolino is offline 







norway
PostPosted: Wed Aug 31, 2011 5:00 pm    Post subject:  
Description:
Reply with quote

Seems to me that would make it difficult to make targeted effects as well- like tractor beams or a tracking disruptor reducing chance to hit on a single hostile ship?
-orn not.. Should work unless i`m missing something..


looking at the sobgroupfunctions, but i don`t seem to have an "efficiency.lua" search engine can`t find one on my computer with that name..
Back to top
View user's profile Send private message
Sagyxil

Content Admin
Content Admin




Gender: Gender:Male
Age: 34
Joined: 27 Jan 2009
Posts: 2443
Sagyxil is offline 
Post Vote: User is appraised 2.75 out of 5
Location: Western US
Interests: Programming, 3d modeling, gaming
Occupation: Student



usa
PostPosted: Wed Aug 31, 2011 6:53 pm    Post subject:  
Description:
Reply with quote

They are in the same folder.
The file name efficency.lua; I keep forgetting the file name was spelled wrong.
Back to top
View user's profile Send private message Send e-mail
Baudolino

Captain
Captain




Gender: Gender:Male

Joined: 25 May 2011
Posts: 172
Baudolino is offline 







norway
PostPosted: Thu Sep 01, 2011 11:52 am    Post subject:  
Description:
Reply with quote

Having trouble making sense of the sobgroupfunctions.lua.

At the outset it seems like an item reference list, but towards the end there seem to be some command functions.

What am i actually looking at here (at what is the actual purpose of sobgroupfunctions):
--x cs ricostrzine moduli se distrutta
if SobGroup_AreAnyOfTheseTypes("split" .. tostring(Group) .. tostring(Counter), "hgn_crewstation") == 1 then

gradocorrente = 0
if gradoList[SobGroup_OwnedBy("split" .. tostring(Group) .. tostring(Counter))+1] == "Ensign " then
gradocorrente = 0
elseif gradoList[SobGroup_OwnedBy("split" .. tostring(Group) .. tostring(Counter))+1] == "Lieutenant " then
gradocorrente = 1
elseif gradoList[SobGroup_OwnedBy("split" .. tostring(Group) .. tostring(Counter))+1] == "Commander " then
gradocorrente = 2
elseif gradoList[SobGroup_OwnedBy("split" .. tostring(Group) .. tostring(Counter))+1] == "Captain " then
gradocorrente = 3
elseif gradoList[SobGroup_OwnedBy("split" .. tostring(Group) .. tostring(Counter))+1] == "Commodore " then
gradocorrente = 4
elseif gradoList[SobGroup_OwnedBy("split" .. tostring(Group) .. tostring(Counter))+1] == "Admiral " then
gradocorrente = 5
elseif gradoList[SobGroup_OwnedBy("split" .. tostring(Group) .. tostring(Counter))+1] == "Fleet Admiral" then
gradocorrente = 6
end

if SobGroup_GetHardPointHealth("split" .. tostring(Group) .. tostring(Counter), "isEnsign") == 0 then
SobGroup_CreateSubSystem("split" .. tostring(Group) .. tostring(Counter), "isEnsignCore")
end

if SobGroup_GetHardPointHealth("supporter"..SobGroup_OwnedBy("split" .. tostring(Group) .. tostring(Counter)), "isLieutenant") > 0 and gradocorrente >= 1 then
SobGroup_CreateSubSystem("split" .. tostring(Group) .. tostring(Counter), "hgn_isLieutenantCore")
end

if SobGroup_GetHardPointHealth("supporter"..SobGroup_OwnedBy("split" .. tostring(Group) .. tostring(Counter)), "isCommander") > 0 and gradocorrente >= 2 then
SobGroup_CreateSubSystem("split" .. tostring(Group) .. tostring(Counter), "hgn_isCommanderCore")
end

why is italian mixed in with the english? makes it harder to understand the strings..

How would i exploit this file for modding?
Back to top
View user's profile Send private message
Baudolino

Captain
Captain




Gender: Gender:Male

Joined: 25 May 2011
Posts: 172
Baudolino is offline 







norway
PostPosted: Thu Sep 01, 2011 2:23 pm    Post subject:  
Description:
Reply with quote

So i wanted to change power a bit, but have trouble locating the toroid upgrades.

The subsystems are called HGN_POWER_M# but the actual upgrades seem to be called P# and i can only find 3 of the 10 in energy.lua..

The idea was to modify the early and later output, but i settled on increasing the powerstation output from 4 to 8.

I also reduced buildcost of crew, research and power station to 1500,2000,3000. Seems power is so integrated with complex that it`s not an option to remove it, so i settled on reducing the strain on the startup for Hiigarans.

HOWEVER i did get and idea how to maybe bypass the hardcode limitations on my Combined Arms Bonus idea.

Case:
The game seems to favor collective bonus over individual bonuses and it`s impossible to limit a bonus to a single ship type. I.E - i want destroyer to provide MaxHealth and HealthRegen bonus to ONLY frigates.

The idea:
How about writing up a CombArms file similar to the energy file that allows for bonuses to Frigates in range of the destroyer. Maybe this is a way to introduce new specific bonuses without being swamped in cumulative bonuses?


I`m not entirely sure at which point the game actually accesses the energy.lua though. Is the command string in sobgroupfunctions.lua?
Back to top
View user's profile Send private message
Sagyxil

Content Admin
Content Admin




Gender: Gender:Male
Age: 34
Joined: 27 Jan 2009
Posts: 2443
Sagyxil is offline 
Post Vote: User is appraised 2.75 out of 5
Location: Western US
Interests: Programming, 3d modeling, gaming
Occupation: Student



usa
PostPosted: Thu Sep 01, 2011 2:59 pm    Post subject:  
Description:
Reply with quote

Quote:
The subsystems are called HGN_POWER_M# but the actual upgrades seem to be called P# and i can only find 3 of the 10 in energy.lua.
References to a specific subsystem on a ship would be aggravating (since one of several subsystems could be in a given slot), so scripts typically check the ship's hardpoint to see if there is a subsystem there (by seeing if the subsystem's health is > 0) So if only one subsystem can be built there, there is little doubt as to what would be there.

Quote:
Seems power is so integrated with complex that it`s not an option to remove it,
Not really. The minimum lines to remove the power system is 5, I believe.

Quote:
so i settled on reducing the strain on the startup for Hiigarans.
The scripts are timed to occur at specific intervals to help manage the overall workload on the CPU.

Quote:
I`m not entirely sure at which point the game actually accesses the energy.lua though. Is the command string in sobgroupfunctions.lua?

The function is actually named energyConsume in the scripts, and it is used exclusively by interface.lua
Back to top
View user's profile Send private message Send e-mail
Baudolino

Captain
Captain




Gender: Gender:Male

Joined: 25 May 2011
Posts: 172
Baudolino is offline 







norway
PostPosted: Thu Sep 01, 2011 3:22 pm    Post subject:  
Description:
Reply with quote

Also - i just had another idea regarding setting up a Frigate specific bonus from Destroyers..

Maybe it would be possible to set up an area of effect weapon that fires continously once activated and ONLY targets friendly frigates. That would still leave the cumulative bonus problem though..

And what about the idea of setting up a Combined Arms Bonus file similar to the energy.lua- would that be feasible? When looking at the strings i`m thinking that a combined arms bonus.lua could accept or decline the bonus emenating from the destroyers depending on ship type (Frigate or not) and check for multiple bonuses?

Is this possible?

It takes forever to figure out these things alone so i prefer finding out of an idea is plausible before chasing it down..
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Homeworld 2 Complex Forum Index -> General All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum





Homeworld 2 Complex topic RSS feed 
Powered by MasterTopForum Premium with phpBB 2003 - 2009