You must be logged in to post messages.
Please login or register

Modpack Discussion
Moderated by Crazed Ewok, Gen_Rhys_Dallows

Hop to:    
Topic Subject: Giving a unit 2 attacks?
posted 06-10-18 11:33 PM EDT (US)   
I'm trying to mod the AT-ST so that it has two attacks instead of one: A rapid fire blaster cannon and an occasional shot from a grenade launcher. I tried looking in the Advanced Genie Editor tables but couldn't find a way. I remember installing a mod a long time ago that added a unit with two attacks so I think that it can be done. I'd appreciate any advice. Thanks
posted 06-12-18 09:00 AM EDT (US)     1 / 3  
If you are making this for a mod, I don't think I can help you, but if you are making if for a scenario - then I can.

There is a major mod for Battlegrounds called Expanding Fronts, which adds a lot of new stuff, including new triggers. You can download the EXE installer version or the manual installation version. If you have problems with installing the mod, you can visit this thread.

The trigger effect you should be looking for is Change Unit Data. What you need to know and do so you can achieve your goal is this:

Commands in Change Unit Data you would need:

SET ReloadTime1 X
The higher X is, the slower the unit will fire. Troopers have a reload time of 2 for example, i.e. they fire 1 projectile per 2 seconds (in-game seconds).

SET ProjectileUnitID X
X represents the projectile's ID in the units' list.

Here are some red lasers, possibly for your rapid cannon:
363/364/2628/2629 - red laser (new sounds)
504 - red laser (old sounds)
2626 - red laser (quiet sounds)
2349 - red laser (strange sounds 1)
1728 - red laser (strange sounds 2)
1679 - red laser (mech sounds 1)
1692 - red laser (mech sounds 2)
1691 - red laser (mech sounds 2);(mech destroyer impact)
1693/1694 - red laser (mech sounds 3)
2144 - red laser (mech sounds 4)
3128 - red laser (mech destroyer impact)
1688 - red laser (other sounds 1)
1690 - red laser (other sounds 2)
1734 - red laser (other sounds 3)
1741 - red laser (other sounds 4)
1799 - red laser (other sounds 5)

Here are some grenade projectiles:
1174/1880 - grenade
1677 - grenade (new sounds 1)
1801 - grenade (new sounds 2);(explosive impact)

Note that these projectiles have the same looking, but different sound and impact.

More information about projectile ID's you can find here.

You may also want a blast radius for the grenade. The command is this:

SET BlastRadius X
X represents the area of effect.

You may also want to use:

SET Range X
X represents the range.

SET MinRange X
X represents the minimal range.

SET DisplayedAttack X
SET DisplayedRange X

For the last two X represents what number will be displayed for the unit's attack/range. This is if pluses next to the attack/range parameter bother you.

The full trigger guide for the mod is here.

If you want to switch between rapid and grenade attack you will need at least two triggers - one, which sets a rapid laser attack (this is to say, change reload time, projectile and blast radius if there is going to be a change of the blast radius) and one, which sets a grenade attack (reload time, projectile and blast radius if there is going to be a change of the blast radius). The trigger conditions should be determined by you - depending on the way you want them to be switched.

However, if you wish the grenade to appear among the lasers, I still think I can help, but it will be later as now I have to go.

How the hell did you even do that in less than 5 seconds, Lad?!

[This message has been edited by Darth Kiro (edited 06-12-2018 @ 09:03 AM).]

posted 06-12-18 12:30 PM EDT (US)     2 / 3  
andrewcmunroe, you need to set a different secondary projectile unit ID and edit min/max total projectiles accordingly. Secondary projectile uses it's own attack values.

Darth Kiro, I don't think you understand OP's question...
posted 06-20-18 11:24 PM EDT (US)     3 / 3  
I'm an old dude that occasionally lurks here because of my interest in Expanding Fronts. Haven't posted here in a long time but I'm glad I saw your question because I can help you with this.

To give a unit multiple attacks, you need to add it as a cannon type unit. Making an AT-ST like that would be really easy because the graphics don't need to change with the different attacks. If you have specific questions on how to do that just let me know, however I haven't used the newest genie programs so there may be better ways to add units now that I'm not familiar with.

Sierra Wolf
SWGB Heaven » Forums » Modpack Discussion » Giving a unit 2 attacks?
You must be logged in to post messages.
Please login or register
Hop to:    
SWGB Heaven | HeavenGames