Jump to content


Gambit

Member Since 02 Nov 2011
Offline Last Active Yesterday, 10:09 PM

#1102406 How would I add more than one vehicle to a squad without the game crashing?

Posted by Gambit on 17 July 2019 - 08:34 PM

Well, the problem is that the repair command (even a "click-issued" one) works only on squads...

You cannot target/select a "specific" member of a squad, your "left-click" always selects the squad as a WHOLE  :thumbsdownsmiley:

And this is true for all abilities, weapon, etc. I mean, you cannot specifically target a SPECIFIC entity within a squad (with some exceptions with the leader), no matter what.

 

Deeper/Designer's Note: The engine IDs the "last" entity build, as the one that will be targeted first. Same is true with sounds - in multi-membered squads, you will be listening the voices of the last-created entity. And if that one dies, the previous one (each has an intrinsic cumulative index).

I can get even more technical, but you got the picture :grad:

 

> All in all... You cannot repair vehicles in more-than-one member squads.

 

Alternative

BUT, you CAN create an ability (needs some skill) that targets a squad and only repairs (wherever part of) the damage of its vehicles. :twisted:




#1101900 Alien Hunters - Deathwatch Development

Posted by Gambit on 27 June 2019 - 07:34 AM

GOD DAMN GUYS!!!! :w00t: :w00t: :w00t: :ohmy:

OK, I will try to finish with Ultramarines TODAY!!!

My day is free, so I think I will make it.

 

... I WANT to see those Centurions, IN game!!! :aarambo:

(and I want to exclusively re-engage the Ordo Xenos)!!

 

 

OK, something last. THis is for the future of course....

So one guy on Steam asked about a coop campaign.

...THIS is what we will do with the Alien Hunters mission!!!  :xcahik_: 

One of my ideas was, three inital squads, and you play the mission as one player, BUT we can share control with more players!!

Imagine something like DoW2, but with DoW1 mission death, not just "kill' em all"!

This is just a plan, we will of course proceed with that, if you approve.




#1101690 Loki's resurce senter

Posted by Gambit on 18 June 2019 - 08:54 PM

Sexy Necron/ necron Dynasties: Almost near a Beta mod, but a ton of work remains. I have plans to buy a new PC, and use 3d max in the same way Brother Kekoulis does to make original stuff for our Robot Skeletons. I also have to learn more FX, and create over 200 new skins. This is a passion project, and will be worked on always.

Brother Norwegian Loki, I think that Necron Dynasties should be your top priority, after you finish with your first top priorities :p

There are already enough models in UA to use, and the same goes for FXes and stuff...

The Necrons got the least of our attention.

Just saying. :party:

 

Dark Eldar: My other passion. Will not be worked on for now, but a new "Sexy" pack with dark harlequin will be released.

Dark Eldar Cabals should be next!! And it is the same as with ND, there is a lot you can use from UA :grad:

 

Again, this is my own perspective and I just share it, nothing more.




#1100632 Some question regard of modding with Corsix

Posted by Gambit on 17 May 2019 - 09:50 AM

Dammit, I misundersttod. I though that you wanted an ability of a multi-membered squad, NOT to affect any (possibly) attached commander.

But you simply want the ability of the commander, NOT to affect the squad he may be attached to!!!

 

In this case things are very easy. No ticks required. :thumbsupcool:

 

>> So, go into the ability, in the area_affect/area_effect_information, and set the area_type to tp_area_effect_point.

And then in the modifiers ability confers (like the health regeneration modifier you are after, or ANYONE other modifier you want), set the application_type to tp_mod_apply_to_entity. :grad:




#1100253 Paid Mod project

Posted by Gambit on 04 May 2019 - 06:21 PM

OK, so I spoke with brother Kekoulis, and we decided that we do not have the time to do such a thing!!!

See, I was about to code all the things I have left unfinished in Unification (too much SCaR work involved), and brother Kek is FULL on Emperor's Children and Ultramarines... And other stuff. Yeah, he is always 3Ding! :twisted:

 

Not to mention that we have a loooong schedule to follow ... (we want to "finish" Thousand Sons next)

 

 

Even more (and this is important),... money always perplexes things :thumbsdownsmiley:

We discussed this, and we are both STRONGLY against any form of "payment".

Modding is fun, first a and foremost. It's a game by itself!

And we do not like the "money" idea at all, it will break the fun...

I understand your idea, offering a "motive", of course.

 

But we (my team) have done so many things so far, solely having sharing in mind.

Hell, we do not even like the idea of donations!!!

So... We will not be able to assist you.

 

Sorry for the inconvenience man.




#1100166 Loki's resurce senter

Posted by Gambit on 02 May 2019 - 05:16 AM

Thanks a lot brother Unsociallobster!

I will put them in, and test them ASAP :thumbsupcool:




#1098827 Questions about modding weapons

Posted by Gambit on 25 March 2019 - 11:40 AM

Yeah, the logic you followed above for strategy selection is neat.

And frankly, I used similar variations (some widely varied) for specific mods, like Chaos Daemons or Thousand Sons.

 

Three remarks:

 

1] In both tactics, Strategy 1 is NEVER chosen. Why? For Chaos is 2-5 and for Eldar 2-4. But never 1.

 

 

2] In Chaos tactic, the first two conditions generate the same result, so the "proper" coding method is a bit different. Thus, instead of :

...
if (sEnemy == "space_marine_race" or sEnemy == "chaos_marine_race" or sEnemy == "necron_race") and (iClosestEnemyDistance <= 300) then
        return math.random(2, 4)
        
    elseif (sEnemy == "guard_race" or sEnemy == "ork_race" or sEnemy == "eldar_race" or sEnemy == "tau_race") and (iClosestEnemyDistance <= 300) then
        return math.random(2, 4)
...

...you should have both in ONE check:

...
    if (sEnemy == "space_marine_race" or sEnemy == "chaos_marine_race" or sEnemy == "necron_race" or sEnemy == "guard_race" or sEnemy == "ork_race" or sEnemy == "eldar_race" or sEnemy == "tau_race") and (iClosestEnemyDistance <= 300) then
        return math.random(2, 4)
...

3] The only thing that I kinda disagree with, is that in your Eldar version, the code invariably chooses strategy, solely based on given conditions. You could risk a modicum of randomness, because it is not proper to ALWAYS have the same tactic.

 

For example, you can use a logic like...

...
    if (sEnemy == "space_marine_race" ...) then
        if math.random(1, 4) > 1 then
            return 2
        else
            return 3
        end
    elseif
...

In this case if the first conditions are met, the code will return Strategy 2, with 75% probability (3 out of 4). Else, it will return Strategy 3. This, DOES add a modicum of randomness, and is still very consistent to what you are trying to achieve. :thumbsupcool:

And by increasing 4 to (say) 5, the math.random(1, 5) will give 80% chance. And so on.

Sometimes, I even use even more complex probability formulae, like math.random(1, math.random(1, 3)) :twisted:

 

 

I've been thinking about using the unfocused basic strategy on easier difficulty levels and making the ChooseBuildProgram() function run whenever a player is defeated but I don't have much experience coding.

I am under the impression that in easy/easier difficulty, the code ALWAYS returns Strategy 1...
So my Remark 1] above, may not need addressing!
Meaning, that you have already reserved strategy 1 EXCLUSIVELY for easy games :thumbsuphappy:

But I am not 100% certain on my assumption... ( and I am lazy to look at the CORE AI code to make sure :p  )




#1098393 Questions about modding weapons

Posted by Gambit on 17 March 2019 - 11:29 AM

The logic above is wrong...

The three lines where "=55" is repeated, should NOT be so, because at that point the code calculates the CUMULATIVE value of each strategy, NOT the actual value of each strategy itself! So the new values should be ascending, not equal.

 

So, yes, if it is so, as long as the randomiser value is below or equal to 55, ONLY STRATEGY ONE will be chosen.

Else, (>55) it will always choose strategy 4.

 

The idea is:

1] Calculate the BASIC probability of each strategy, based on map size and optionally, closer enemy distance.

2] Modify the basic probability, based on closer enemy race, or other factors.

3] Add probabilities so that to get cumulative values, and choose based on that.

 

 

 

 

 

----------------------------------------

More thoughts...

 

First, let me say that I am NOT using that exact logic I described above, for the races I code.

I prefer a different approach in each, and I adapt and changes the code based on each race's needs.

 

Even so, the idea above is:

 

1] The probability of each build program is calculated initially, based on map size, and then modified by closest enemy. For example, in the Eldar strategy you posted (which is NOT generic, but highly specialised, for strategy 4)

    if (sMapSize == "small" or iClosestEnemyDistance <= 100) then
    
        iBuildProgram1 = 34
        iBuildProgram2 = 33
        iBuildProgram3 = 33
        iBuildProgram4 = 0
        
 
    elseif (sMapSize == "large" and iClosestEnemyDistance >= 100) then
    
        iBuildProgram1 = 0
        iBuildProgram2 = 0
        iBuildProgram3 = 0
        iBuildProgram4 = 100
    else
    
        iBuildProgram1 = 0
        iBuildProgram2 = 0
        iBuildProgram3 = 0
        iBuildProgram4 = 100
    end
    
    -- Modify probabilities according to the closest enemy player
    local oEnemy = cpu_manager:FindClosestEnemyPlayer(false)
    local sEnemy = oEnemy:GetPlayerRaceName()        
    if (sEnemy == "space_marine_race" or "chaos_marine_race") then
    
        iBuildProgram2 = iBuildProgram2 + 0
        iBuildProgram3 = iBuildProgram3 - 0
        
    elseif (sEnemy == "guard_race" or sEnemy == "tau_race" or sEnemy == "ork_race") then
    
        iBuildProgram1 = iBuildProgram1 - 0
        iBuildProgram2 = iBuildProgram2 + 0
        iBuildProgram3 = iBuildProgram3 - 0
    end

Say we have a small map, and the first enemy is closer than 100. The prorgam will follow the first IF, and set the original values thus:

iBuildProgram1 = 34
iBuildProgram2 = 33
iBuildProgram3 = 33
iBuildProgram4 = 0

2] Then, based on closest enemy, it will modify the values. Your code was:

    -- Modify probabilities according to the closest enemy player
    local oEnemy = cpu_manager:FindClosestEnemyPlayer(false)
    local sEnemy = oEnemy:GetPlayerRaceName()        
    if (sEnemy == "space_marine_race" or "chaos_marine_race") then
    
        iBuildProgram2 = iBuildProgram2 + 0
        iBuildProgram3 = iBuildProgram3 - 0
        
    elseif (sEnemy == "guard_race" or sEnemy == "tau_race" or sEnemy == "ork_race") then
    
        iBuildProgram1 = iBuildProgram1 - 0
        iBuildProgram2 = iBuildProgram2 + 0
        iBuildProgram3 = iBuildProgram3 - 0
    end

... Which does NOT modify the probabilities at all!!! Why so??? If you do not modify, then simply remove this part of the code :p




#1098360 Questions about modding weapons

Posted by Gambit on 16 March 2019 - 11:34 AM

... But.... There is NO call for the SetSquadLimitsBasedOnStrategy anywhere :p

If you see above, my Daemons code calls it :grad:

So you simply forgot a line!. You must do the same as in Daemons, so try this:

 

 

.......

    if (iRandom <= iBuildProgram1) then

        

        return 1

    elseif (iRandom <= iBuildProgram2) then

        

        return 2

    elseif (iRandom <= iBuildProgram3) then

        

        return 3

    elseif (iRandom <= iBuildProgram4) then

        self:SetSquadLimitsBasedOnStrategy(4)

        return 4

    end

end

.....

 

 

The idea is, once you have chosen a program, to RE-INPUT the updated values.

So you must call the function, because by itself it does.... nothing :p




#1098289 Questions about modding weapons

Posted by Gambit on 14 March 2019 - 08:11 AM

Of course! But it may be tricky....

Just decide on the conditions, and put a simple line like this:

BuildBaseStrategyInfo.deamons_race.SquadLimits.standard.daemon_squad_flesh_hound = math.random(4,6)

In your code.

 

Or make a different function, and call it whenever necessary.
If you want the new limits to be strategy-dependent as well, the store the strategy (at the place the code chooses it) in a global variable, and use an IF statement to discern.




#1098174 Questions about modding weapons

Posted by Gambit on 11 March 2019 - 11:05 AM

Hmmm... I do not know for sure. Normally, even if there is no plan the AI will spawn something...

As to why your own plan is not taken into account, ... There are many factors that come into play and I cannot remotely suggest anything.

 

 

Now here is the code for changing (even limiting to 0) the number of squads produced, based on plan.

What follows, is the code as appears in Chaos Daemons (latest build), you will have to modify names appropriately.

 

 

So, set the SquadLimits normally, in your YOUR_RACEstrategyinfo.ai file. Nothing changed here.

 

Then, use the following code in your YOUR_RACEbuildbasestrategy.ai file, and only include the squads that you want to change their SquadLimits - the others will not change, of course:

 

a) go into your YOUR_RACEBuildBaseStrategy:ChooseBuildProgram() function, and when your code chooses a strategy, add a call to the new function that changes the limits. Here is an example from Chaos Daemons:

function DaemonsBuildBaseStrategy:ChooseBuildProgram()
.....
    if (iRandom <= iBuildProgram1) then
        g_iHarassingLeader = 1
        self:SetSquadLimitsBasedOnStrategy(1)
        return 1
    elseif (iRandom <= iBuildProgram2) then
        g_iHarassingLeader = 2
        self:SetSquadLimitsBasedOnStrategy(2)
        return 2
.....

As you can see, there is a call to the SetSquadLimitsBasedOnStrategy function. This is the one that changes the squad limits.
And this function is VERY simple!!! (put it anywhere into your YOUR_RACEbuildbasestrategy.ai file. I have but it immediately after the DaemonsBuildBaseStrategy:ChooseBuildProgram() function, for consistency). So here it is:

function DaemonsBuildBaseStrategy:SetSquadLimitsBasedOnStrategy(iStrategy)
    if iStrategy == 1 then
        -- Khorne
        BuildBaseStrategyInfo.deamons_race.SquadLimits.standard.daemon_squad_flesh_hound = math.random(4,6)
        BuildBaseStrategyInfo.deamons_race.SquadLimits.standard.daemon_squad_bloodletters = math.random(5,8)
        BuildBaseStrategyInfo.deamons_race.SquadLimits.standard.daemon_squad_plague_bearers = math.random(1,2)
        BuildBaseStrategyInfo.deamons_race.SquadLimits.standard.daemon_squad_fiends = 0
        BuildBaseStrategyInfo.deamons_race.SquadLimits.standard.daemon_squad_fiends_advanced = 0
        BuildBaseStrategyInfo.deamons_race.SquadLimits.standard.daemon_squad_daemonettes = 0
        BuildBaseStrategyInfo.deamons_race.SquadLimits.standard.daemon_squad_screamers = math.random(1,2)
    elseif iStrategy == 2 then
        -- Slaanesh
        BuildBaseStrategyInfo.deamons_race.SquadLimits.standard.daemon_squad_flesh_hound = 0
        BuildBaseStrategyInfo.deamons_race.SquadLimits.standard.daemon_squad_bloodletters = 0
        BuildBaseStrategyInfo.deamons_race.SquadLimits.standard.daemon_squad_plague_bearers = math.random(1,2)
        BuildBaseStrategyInfo.deamons_race.SquadLimits.standard.daemon_squad_fiends = 0
        BuildBaseStrategyInfo.deamons_race.SquadLimits.standard.daemon_squad_fiends_advanced = math.random(4,6)
        BuildBaseStrategyInfo.deamons_race.SquadLimits.standard.daemon_squad_daemonettes = math.random(3,5)
        BuildBaseStrategyInfo.deamons_race.SquadLimits.standard.daemon_squad_screamers = math.random(1,2)
    elseif iStrategy == 3 then
...

As you can see, it CANNOT get any simpler.
What it does, is simply putting new values to the SquadLimits sub-array, based on strategy chosen.

QUITE simple :p

 

If you have any issues, please let me know. For Chaos Daemons - where we DO want specific roster based on strategy, it works flawlessly.

 

 

 

NOTE: Another update that I am ALWAYS coding in AI, (and updated the vanilla TAU ai in Unification Bugfix), is a check, on AI re-initialisation.

See, if the AI has already chosen a tactic, and this tactic is exclusive (like in chaos daemons), then you want the AI to ALWAYS re-select THAT strategy, on re-initialisation (for example after a save->load).

So in my ChooseBuildProgram() I make an additional check at the beginning, to see WHICH strategy to return.

Here is an example from Chaos Daemons.

function DaemonsBuildBaseStrategy:ChooseBuildProgram()

    -- Check build program count
    if (table.getn(self.info.BuildPrograms) ~= 5) then
        return BuildBaseStrategy.ChooseBuildProgram(self)
    end

    -- If a Mark has already been chosen (from a saved game, change players wincondition, etc.),
    -- continue with that Program and do not change, or the tech will be messed-up.
    if cpu_manager.cpu_player:IsResearchComplete("daemons_mark_khorne") then
        g_iHarassingLeader = 1
        self:SetSquadLimitsBasedOnStrategy(1)
        return 1
    elseif cpu_manager.cpu_player:IsResearchComplete("daemons_mark_slaanesh") then
        g_iHarassingLeader = 2
        self:SetSquadLimitsBasedOnStrategy(2)
        return 2
    elseif cpu_manager.cpu_player:IsResearchComplete("daemons_mark_tzeentch") then
        g_iHarassingLeader = 3
        self:SetSquadLimitsBasedOnStrategy(3)
        return 3
    elseif cpu_manager.cpu_player:IsResearchComplete("daemons_mark_nurgle") then
        g_iHarassingLeader = 4
        self:SetSquadLimitsBasedOnStrategy(4)
        return 4
    end

    -- If no strategy program has been chosen, chose one.

    -- Get map size and closest enemy distance
    local sMapSize, iClosestEnemyDistance = self:GetMapSize()
...

As you can see, if there IS a strategy chosen (the checks) the AI returns THAT strategy (first it sets the new limits, of course).

The above method checks for a Research. If you need code for a structure-based strategy selection, just see the Witch Hunters Code :grad:

 




#1098119 Questions about modding weapons

Posted by Gambit on 10 March 2019 - 11:27 AM

How do I tell the ai not to build a unit with a specific BuildProgram?

The current code does not support it. I have created additional code for it. :grad:

You have to force-modify the SquadLimits.standard.SQUAD_NAME...

 

Do you have access to the latest Chaos Daemons mod?
I have created a new function there, called SetSquadLimitsBasedOnStrategy(iStrategy).

See in strategies/daemonsbuildbasestrategy.ai

If you do not have it, just say so and I will tell you how to do it.

 

 

I think ai also ignores Min. ArmyStrength.

This is for the AI to check if it should attack the enemy with the army it has currently deployed.

And I think it does use it. But if you insist, I can give a quick check on the CORE attack plan...




#1097703 Loki's resurce senter

Posted by Gambit on 28 February 2019 - 07:57 PM

:ohmy:

DAMMIT MAN!!!

Those look really awesome, INCREDIBLE quality... :ohmy:

 

I WANT TO PUT THEM IN, NOW :xcahik_: :xcahik_: :xcahik_:

 

Brother Unsociallobster, I salute thee.

Will test them later tonight, and report back.

Unification will look A W E S O M E now!!!! :xcahik_: :xcahik_: :xcahik_:




#1096458 How to use a mod with the vanilla/WA campaigns?

Posted by Gambit on 28 January 2019 - 05:25 PM

Sorry for the late reply, there was a medical emergency in my family (under control, but still ... unsettling)

 

Anyway. What about the "corpse gets back up where it died instead of spawning anew" feature the Necrons have? Was that introduced in the WA build or was it in vanilla too? Because I thought it would be neat if every commander could do that, not just the Necron Lord. Mostly as a convenience feature for the player.

I am not sure when, but remember that it requires a "get buck up" anim, which meant it requires 3D work.

Also, this is a Necron feature, so I do not think it should be added to other races...

Only miraculous intervention is similar (SoB).

 

Also, speaking of abilities. Is it possible to set an ability to start on cooldown instead of immediately ready to go the moment the unit pops out of its production structure?

I have not achieved this so far. I have bested MANY AE challenges and limitations, but this eludes me so far.

At the moment, I need this for Witch Hunters as well, so I will give it a second shot.

See, there is an ability of a new Saint unit (brother Kekoulis'es courtesy, as always!) and I need to utilise it.

So hold on, I may find a solution. It WON'T be easy, though.

 

(Off-topic: Did I mention that we now have... THREE saints in the WH project??)




#1096392 Some question regard of modding with Corsix

Posted by Gambit on 26 January 2019 - 04:05 PM

Unless you are talking about the IN-GAME music each races uses.

In this case, see into Unification_Bugfix/Data/scar/winconditions/Race_Specific_Themes.

So if this is the case, either use that wincondition, or the SCaR command is:

Sound_PlaylistClear( PC_Music )
Playlist_Manager( PC_Music, play_list, false, true, {min_Silence, max_Silence} )

If you need more, just ask.