Repulsor Tweak

Repulsor Tweak

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

incidenta5
Posts: 37
Joined: 15 Mar 2006, 00:40

Repulsor Tweak

Post by incidenta5 »

New Stuff:
Shield strength indicator:
Image

The shield works on any unit with the 'repulsor1' weapon attached. The on/off button ceases to work; however, friendly fire will pass right through the shield to avoid the shield being drained via FF on purpose.

Requirements:
Spring 0.70bX
Absolute Annihilation 1.44

Notes:
- v1 was tested with spring 0.70b1
Download Links
Shield Mod v1
-This includes the new spring.exe, and the modifications I made to AA1.44S as well as a partial VSS report that includes most of the code changes i've made. (On/Off button works; Fire mode selector changes from off,bounce,collision.)

Patch .diff for PlasmaRepulsor.cpp
-Patch for 0.70b1
Original Post:

I recently started modding a few aspects of the Plasma Repulsor that are hard coded into the spring engine.

I made two changes to the way that projectiles interact with the field. First, projectiles no longer bounce and are slowed down significantly to approximately less than 1% of their velocity almost instantly upon entering the field. Second, the projectiles explode once their speed drops below 1.0.

Also, I changed the graphics a bit and made a visible 'shield' impact that changes color based on the ammout of energy in your reserves. Its based on (energy / max_energy) and the color ranges from green to red, where green is 100% and red is less than 10%, it becomes yellow around 50% and looks pretty good.

Do these changes fundamentally alter the balance of the game in any sigificant way, and would it possibly be more fun to play a war of attrition where your 'shield' and energy reserves matter just as much as your army of units? Essentially, the "defense field" mimics the "shield" from Stargate Atlantis if anyone has seen the first episode of the second season. :twisted:
[Edit]
Screenshots:

Highpower
Image

Lowpower
Image

[NEW]
Bounce Mode:
Image

Collision Mode:
Image

Shield Strength:
Image
Last edited by incidenta5 on 24 Mar 2006, 17:29, edited 20 times in total.
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Post by Das Bruce »

So you're making these FBI based?
User avatar
Soulless1
Posts: 444
Joined: 07 Mar 2006, 03:29

Post by Soulless1 »

awesome stuff - though why does it need the beam? I reckon it'd do a great shield effect if it looked the same but without the beam.

Also, is it possible to turn it off yet? Cos that would be useful. :)
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

I guess my short answer to this would be:

1. Anything that makes it mandatory that the Repulsor use Energy in the first place is counter-productive. Not every mod is going to use Energy, or will want to use both the Repulsor and use Energy in another way. Tying them together reduces the possible options.

2. I think it'd be cooler, in general, if Repulsors could be affected/immune to a larger number of things, much like the way that the Armor tag system works. This could lead to terrific innovations in mods- we could have entire game designs built around weapons that can pass through some Shields, do super-heavy damage to others, and are worthless against a third option, for example.

3. The bounce makes perfect sense for some situations. I've played with the bounce, and if handled really carefully, you can get some jaw-dropping results with it.

I guess what I'm saying is that I really like the special-effect, and I really like how you're extending the game code to give us a better feature, but what we need, in general, out've any new features... is the same flexibility that exists in most of the TA code that Spring emulates so well. OTA was a great game design in large part because it has so much flex, and so many possible combinations of options. When you start putting things in too tight of a pigeon-hole, like the idea you've proposed, though... then it's probably not something that modders like me, who want to build new game designs for Spring, are likely to use.
incidenta5
Posts: 37
Joined: 15 Mar 2006, 00:40

Post by incidenta5 »

The beam part is about 5 lines of code so it would be pretty easy to comment out. My latest build attempts to block both MERL Missiles and Rockets. So far I can get it to target them, but it has difficulty in slowing them down due to the speed being reset when the missile updates its own position.

The funny thing is that I can get the missiles to blow up early, and I can get the shield effect to draw; just not both at the same time, yet.
Also, is it possible to turn it off yet? Cos that would be useful. :)
I'll look into getting it to turn off, I hadn't noticed that bit before you mentioned it.
When you start putting things in too tight of a pigeon-hole, like the idea you've proposed, though... then it's probably not something that modders like me, who want to build new game designs for Spring, are likely to use.
I was thinking about branching the PlasmaRepulsor weapon into two or three different types. That way, for the time being, you could have the old style bounce, or the shield effect.

In fact, I was thinking about using the fireState toggle to allow you to switch between the regular 'bounce' mode and the 'collison' mode. The problem there would be the lack of a means to change the power requirements between the two modes.

[Edit]
I fixed the PlasmaRepulsor weapon so that it automatically checks the fireState of the the unit/building its attached to. Works perfectly. Now you can turn it off :)

No more 'beam' effect:
Image
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Hmm... it really should support the "onoffable=1;" tag from unit TDFs, I think. That's where people are going to expect to be able to use this- turn the Shield on, turn it off... or change states, with differing effects.

In addition, it needs to call a different bitmap, preferably a bitmap called in the FBI (say, like a line that says "impactbitmap=MyBitMapName;" ). Calling the explosion bitmap really limits us in a lot've ways, just as how the current explosions are severely limited in looks/variety because we cannot name new bitmaps for the various named particles, which go to hardcoded locations instead of flexible ones. It's pretty clear, from the last release, that we're heading away from this, which is great- set the bar higher, and give use the ability to have different Shields that look different, simply by using a different bitmap projected across the sphere or whatever.

Other than that... well, I guess asking for you to make it read a value in a TDF and then check vs. a SHIELD database for various states on impact (say, "ignore", "shieldvalue=0-1.0" to raise/lower the default effectiveness, and "maxdamage", "autoheal" and "timedown") would be too much for one go, eh? Gimme all that, and we can totally do Trek, Star Wars, and other awesome sci-fi mishmash mods with complete believabilty and authenticity ;)
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Post by Warlord Zsinj »

Any chance of getting lasers reflecting so that we can get some lightsabers happening? ;)
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Post by Das Bruce »

It would be cool if we could have it texture based some how, but that would require perpolygon detection. :roll:
SJ
Posts: 618
Joined: 13 Aug 2004, 17:13

Post by SJ »

Why add a seccond beam effect to it? There already is one although with low alpha value, better just to rise the alpha of that if one want a beam.

As for only being able to target some projectiles, add a bitfielt to the repulsor/projectiles working in the same way as the targetable/interceptor fields do for nuke/antinukes.
incidenta5
Posts: 37
Joined: 15 Mar 2006, 00:40

Post by incidenta5 »

SJ wrote:Why add a seccond beam effect to it? There already is one although with low alpha value, better just to rise the alpha of that if one want a beam.

As for only being able to target some projectiles, add a bitfielt to the repulsor/projectiles working in the same way as the targetable/interceptor fields do for nuke/antinukes.
I've just started exploring the way Spring is setup behind the scenes, so when I get a chance I'll explore this. :shock:

[Edit]

I recoded a bit of the PlasmaRepulsor code and it now uses the on/off button that I added to the Defense Field Emitter building.

This is a mod on top of AA1.44S that adds the on/off button and toggle.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Can we have control over the colour? for example the droideka in starwars will have blue shields always regardless of energy, and the same for startrek, although in ST:Armada they used a system similair to that with green->red....
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Post by SinbadEV »

I like the new effect and I like the old effect, I like the beam/missile command effect for some things too... I think it should be something that either fbi, weapons deffinition, or script handles... 3 options for repultion, the "bounce" effect we currently have, this "explodes on impact" option, and a simple "replection" option... I can't think of any other types of shield can be simulated with those 3 options.
incidenta5
Posts: 37
Joined: 15 Mar 2006, 00:40

Post by incidenta5 »

SinbadEV wrote:I like the new effect and I like the old effect, I like the beam/missile command effect for some things too... I think it should be something that either fbi, weapons deffinition, or script handles... 3 options for repultion, the "bounce" effect we currently have, this "explodes on impact" option, and a simple "replection" option... I can't think of any other types of shield can be simulated with those 3 options.
I'm working on adding more configuration options to the FBI file for the DF Emitter itself.

So far I was thinking about the following additions to the UnitDef structure:
Shield Strength
Shield Max
Shield Recharge Rate
Shield Type (which weapons it will block)
Shield Beam Size
Shield Size
Shield Beam RGB
Shield RGB

I already have the behavior of the emitter linked to the fire state:
Hold Fire - (same as the off button)
Return Fire - bounce mode
Fire at will - detonate upon impact

On/Off switch - works now.

NOTE: I added a download link to a working version on my first post.

(whats FBI? I haven't heard of that acronym before.)
Last edited by incidenta5 on 17 Mar 2006, 13:03, edited 1 time in total.
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Post by SinbadEV »

... fbi is the extention for unit deffinitions... http://taspring.clan-sy.com/wiki/Units:FBI ... please tell me you was joking... right?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

FBI files are text files, starting with a named object, say like [LASER (the other bracket is missing cus of PHPBB, not because it's missing IRL) then bracketed with "{" and closed with "}" Inside of every Weapon file is a [DAMAGE declaration, that is also bracketed/closed in like fashion. Other than the brackets, these files do not obey any particular order- whatever is between the opening/closing brackets is read into memory, associated with that weapon.

These files are the control definitions for weapons in the TA engine, and are used in the same capacity in Spring. Open up the Weapons folder in AA to see FBI files, but they're all basically the same.

Basically, we need that part working in order to make much use of the additional parameters. If you can get that working, though, then it should be a snap, given where you're already at. Very cool stuff :-)
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

Sorry to burst your bubble, but you are meaning .tdf there, Argh. ;)

FBI are text files that control unit statistics/data
incidenta5
Posts: 37
Joined: 15 Mar 2006, 00:40

Post by incidenta5 »

SinbadEV wrote:... fbi is the extention for unit deffinitions... http://taspring.clan-sy.com/wiki/Units:FBI ... please tell me you was joking... right?
Lol
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Oops, duh. Sorry, it's been a very long day at work, here.
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Post by Warlord Zsinj »

Again, no droideka shields until we can reflect lasers.
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Post by SinbadEV »

heh... I alsways thought the Jedi were saying "Destroyers" and the fish-heads were saying "Droidy Cars"... heh...
Post Reply

Return to “Engine”