Posts: 1 773
Threads: 140
Joined: 22 Nov 2004
Reputation:
There's not going to be a Tertiary= or Quaternary= weapon in Ares, or anything remotely similar. What is going to be in it, though, is much better.
Code: [unit]
WeaponCount=25 ;unlimited, really, the unmodded game accepts up to 18 but doesn't use the slots above 2 except for an IFV
Weapon1=something
Weapon2=somethingelse
Weapon3=...
...
Weapon25=yetanotherweapon
EliteWeapon1=somethingE ; *
EliteWeapon2=somethingelseE
...
EliteWeapon25=yetanotherweaponE
There are related issues to resolve, such as AlternateFLH (which actually occupies the same data slots as FLH of weapons 13-18 in the unmodded game). This one is fairly simple.
Harder than that will be creating an algorithm to choose which weapon to use in a particular situation, as well as untangling Ammo(which I don't intend to do right now...).
I do imagine I will end up adding a new section [WeaponSelection] defining how much weight to put on Damage+Verses, Range, and other criteria which I haven't realised yet... (If you want to see how the game does the selection right now, it's nothing fancy, just primary vs secondary - here you go, not shown are some type-specific extensions like deployment, hail Westwood's (in)consistency.)
* There was talk of a Veteran list as well, but I decided that the Veterancy changes will be a sufficient replacement for that.
Related IFV changes
Adding more IFV modes is complex due to the amount of hardcoding Westwood originally put in, such as magic turret names.
Replacing those will be harder, but doable. I do believe that a simple Weapon%dTurretIndex= would work, if you eliminate the lookup step of first finding which of the %sTurretIndex values equals the gunner's IFVMode and then taking that slot's weapon index, and instead say that IFVMode= simply forces Weapon%d to be used, and Weapon%dTurretIndex sets the index of the turret to use for that weapon. I'm not sure if that actually botches any existing IFV code, though...
Posts: 1 571
Threads: 16
Joined: 12 Feb 2005
Reputation:
20.10.2008, 10:20:16
(This post was last modified: 20.10.2008, 10:48:03 by Bobingabout.)
i think, the easiest way to do the weapon choosing thing, especially dealing with unlimited weapon counts, is to forget about naveltargetting, and landtargeting, and together with Verses % modifiers on armour types, go back to relying on AA=, AG=, AN= and, AU= for anti-underwater, and any others you think we need. when deciding weather of not you can shoot, aswell as what to shoot, look at the first weapon, if verses, and A*= tags allow it to damage, then use this weapon, if not, look at the next weapon, untill you run out of weapons.
Also, when coding this don't forget about C4=. perhaps add some new tags to make only certain buildings C4able, but you could always opt for creating a fake C4 weapon in that case, only real difference in a well made fake C4 weapon, and C4=, is that C4= makes the unit actually walk onto the building tiles.
Additionally, for the Immunities vs Armour types argument, the only difference between immune and 0% verses is that you can't target with 0% verses. Instead of writing in a whole new immunities system on top of new armours, Perhaps add a new overide verses value, or tag on the weapon to allow normal shooting at units when you do no damage. This way, not only do you allow the unit to shoot at immune units, but you can also choose the weapon it fired, rather than the first weapon on the list.
-this paragraph continued on the new armour types topic
Posts: 1 033
Threads: 38
Joined: 23 Jan 2005
Reputation:
Bobingabout Wrote:add some new tags to make only certain buildings C4able rulesmd.ini Wrote:CanC4=no
Ever wondered what the hell is going on?
Believe me friend you're not the only one.
--Lysdexia
Check out Launch Base for RA2/YR - http://marshall.strategy-x.com
Also home to the Purple Alert mod, 1.002 UMP, and the YR Playlist Manager.
Posts: 1 571
Threads: 16
Joined: 12 Feb 2005
Reputation:
(20.10.2008, 11:00:11)Marshall Wrote: Bobingabout Wrote:add some new tags to make only certain buildings C4able rulesmd.ini Wrote:CanC4=no
lol, I'm a little out of touch with the game.
Posts: 1 773
Threads: 140
Joined: 22 Nov 2004
Reputation:
Bump. Right now the plan is to gather all the weapons that can hit the target without moving the firer, and then picking the one that would kill it the fastest (Damage * Verses / ROF), and fallback to selecting the one that would kill it the fastest ignoring range if no weapons can hit it as it stands. While respecting the magic flags like LandTargeting. Thoughts before I go and implement it?
Posts: 116
Threads: 6
Joined: 5 Oct 2008
Reputation:
(09.11.2008, 15:49:45)DCoder Wrote: Thoughts before I go and implement it?
Just a suggestion, but perhaps a way for it to choose special weapons (Psychedelic=yes, Temporal=yes), that don't do conventional damage?
Posts: 1 033
Threads: 38
Joined: 23 Jan 2005
Reputation:
DCoder, what you suggested sounds fine.
mt, you need to elaborate on how such a choice-system should be incorporated - sounds very tricky to me, and possibly a separate feature request in any case (possibly a DeployToForceSecondary=y/n flag would be useful, but this is getting off topic)
Ever wondered what the hell is going on?
Believe me friend you're not the only one.
--Lysdexia
Check out Launch Base for RA2/YR - http://marshall.strategy-x.com
Also home to the Purple Alert mod, 1.002 UMP, and the YR Playlist Manager.
Posts: 1 773
Threads: 140
Joined: 22 Nov 2004
Reputation:
DeployFireWeapon= takes a weapon index, always did. Same for OpenTransportWeapon= and a few other special cases.
Posts: 1 571
Threads: 16
Joined: 12 Feb 2005
Reputation:
well, that sounds good, except with more weapons, landtargetting is a bit obsolete, since it is to force the use of specific weapons in certain situations, but i've already mentioned what i think would improve that.
Posts: 1 033
Threads: 38
Joined: 23 Jan 2005
Reputation:
What I meant by DeployToForceSeconday was using deploy as a switch, not to actually deploy or deploytofire. i.e. after deploying the unit would still move as normal but would only use the specific weapon. But like I said that may be outside the scope of the weapon system being discussed right now.
Ever wondered what the hell is going on?
Believe me friend you're not the only one.
--Lysdexia
Check out Launch Base for RA2/YR - http://marshall.strategy-x.com
Also home to the Purple Alert mod, 1.002 UMP, and the YR Playlist Manager.
Posts: 1 571
Threads: 16
Joined: 12 Feb 2005
Reputation:
12.11.2008, 11:20:13
(This post was last modified: 12.11.2008, 11:20:41 by Bobingabout.)
a thought on the Psychedelic=yes and Temporal=yes, plus other simular effects
if the weapon causes an effect that lasts a little time, others might include a RAD effect. first check to see if there is a weapon that can destroy the target in 1 hit, if you find such a weapon, use it, then you should check to see if the weapon is already in effect, if it isn't, then fire it, if it is, then check to see if it will wear out before it gets a chance to fire it again, due to ROF, and if it will run out, fire it again to top it up, if not, fire either a different effect weapon, or fire a conventional damaging weapon.
fire preference when considering different types of weapons should probably be weapon1 first, weapon2 second etc.
also, something i mentioned on the IRC is that ROF should be a "ready to fire" charge timer, rather than a cooldown timer, so, potentially, you don't have to wait a long time after you fire a "grand cannon" type large damage long reload weapon, to fire a "gattling" type low damage quick reload weapon after it. this however would probably require a seperate cooldown timer per weapon rather than per unit, and also opens the opertinity to fire more than 1 weapon at a time, which could be prevented by adding a ROF= to the unit (default is 1, so a different weapon can be fired every frame), as a "this is the minimum length of time you have to wait before firing the next weapon" timer, perhaps this ROF logic could be activated via a tag, so that existing units don't try doing this against design. weapons can be selected the normal way, but, when it encounters a weapon that hasn't been cooled down yet, it skips it to look at the next weapon. and since we're already looking at a "which weapon is best to fire" logic already, it doesn't include these when looking at what to fire next. however, this give you the situation where if the main unit ROF is lower than the mainly used weapon's ROF, then fireing alternate weapons would be very common for the unit.
something harder to do would be to allow firing different weapons at different targets, such as an APOC that's concentrating on shooting cannon fire at a building, can shoot down a Kirov, or some rocketeers without having to stop shooting at the building. i do see the dificulty in this though, as the "near impossible" range.
Posts: 1 773
Threads: 140
Joined: 22 Nov 2004
Reputation:
Quote:something harder to do would be to allow firing different weapons at different targets, such as an APOC that's concentrating on shooting cannon fire at a building, can shoot down a Kirov, or some rocketeers without having to stop shooting at the building. i do see the dificulty in this though, as the "near impossible" range.
Use DistributedFire=yes.
Posts: 1 571
Threads: 16
Joined: 12 Feb 2005
Reputation:
(12.11.2008, 18:45:11)DCoder Wrote: Quote:something harder to do would be to allow firing different weapons at different targets, such as an APOC that's concentrating on shooting cannon fire at a building, can shoot down a Kirov, or some rocketeers without having to stop shooting at the building. i do see the dificulty in this though, as the "near impossible" range.
Use DistributedFire=yes.
I'm pretty sure i've actually used that, and thats not what i meant
what distributed fire does, is fire a single shot, then retargets, waits a few frames then fires at the new target, even if you have Burst=8, it'll only fire a single shot, not 8. also, the AI seems to have issues when using it.
what i meant was, fire the cannon at 1 unit, while firing the missiles at another unit, so focusing on 2 units at once.
Posts: 1 773
Threads: 140
Joined: 22 Nov 2004
Reputation:
Can't do that without breaking a whole lot of magic.
|