Missile/Projectile Weapons

For what's not in 'Top Priority Game Design'. Post your ideas, visions, suggestions for the game, rules, modifications, etc.

Moderator: Oberlus

Message
Author
User avatar
Oberlus
Cosmic Dragon
Posts: 5715
Joined: Mon Apr 10, 2017 4:25 pm

Re: Missile/Projectile Weapons

#46 Post by Oberlus »

Ophiuchus wrote: Sat Feb 08, 2020 6:27 pmyou can have currently only one kind of launched vessel (aka fighter) on board (i.e. only one of Fighter,Interceptor,Bomber,missile or torpedo).
I like that. I have no problem with that limitation. Currently, only on huge, late game hulls you could think of a sensible design with more than one launched vessel (e.g. bomber+interceptor carrier), but you can do two specialliced ship designs. And can't see that as a burden because it makes my fleets more flexible (I can give priority to building one of the types if I want, while I can't do that with a single multi-role design). Adding missiles/torps/etc. to the mix doesn't change that feeling for me.
Ophiuchus wrote: Sat Feb 08, 2020 6:27 pmMy suggestion of getting extra capacity from each missile launcher only works because I use an effect to change the hangar part capacity based on the number of missile launchers. And as i did not want to tackle how to do that if you have multiple hangar parts, i came up with the KISS constraint that you can have only one missile storage per ship. Also i kind of like that because it makes the missile ship design choices different from the carrier design choices.
I don't know if I like or not that constraint. I'll have to test it and think about before forming an opinion.

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Missile/Projectile Weapons

#47 Post by Ophiuchus »

Oberlus wrote: Sat Feb 08, 2020 6:58 pm
Ophiuchus wrote: Sat Feb 08, 2020 6:27 pmyou can have currently only one kind of launched vessel (aka fighter) on board (i.e. only one of Fighter,Interceptor,Bomber,missile or torpedo).
I like that. I have no problem with that limitation.
Same for me. What I meant is that with the current backend implementation it is also the only "choice" possible. That was just a correction on the state of implementation - you said a single-part missile-system is possible right now (at least that is how i understood your post).
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

User avatar
labgnome
Juggernaut
Posts: 833
Joined: Mon Mar 02, 2015 5:57 pm

Re: Missile/Projectile Weapons

#48 Post by labgnome »

Oberlus wrote: Sat Feb 08, 2020 3:33 pmBut I don't like the idea of implementing missiles without internal parts. As per the arguments provided in previous posts, I don't see what's the benefit, while I see a benefit from using interior parts.

I'd like to find a compromise between the both, sure, if that's possible. However, I don't see any middle point in between "use interior parts" and "not use interior parts", appart from what Ophiucus suggested of giving the launch/external parts some ammunition and make the internal parts optional. I still like more the "all ammo in interior parts, external parts only change fire rate" solution, but Ophiuchus is a nice one too (IMO) and I'd be happy with it, I think.
So I'm not completely opposed to internal parts. I just want versatility/configurability in the system that your proposal does not supply if we are going to have two part missile system.
Could you explain in more detail? To help me see how it be if implemented. Interior or Exterior parts? How are they unlocked (techs)? Older parts can be upgraded or new ships must be built?
Sure thing!

Kinetic Missiles: would work similar to fighters, in that there would be one launcher and multiple bays.

The launcher would be and external part. It would be upgraded by techs to launch more missiles. You would not need to replace the launcher.

The bay would be an internal part. New kinetic warhead bays would be unlocked by technologies. You would have to replace your bays if you want better kinetic warheads, and the higher damage warheads should cost more PP.

High-Yield Torpedoes: would work the opposite of fighters, in that there would one bay and multiple launchers.

The warhead bay would be an internal part. It would be upgraded by technologies that make the torpedoes cause more damage. You would not need to replace the bay.

The launcher would be an external part. New torpedo tube launchers would be unlocked by technologies. You would have to replace launchers if you want to launch more torpedoes, and launchers that launch more torpedoes should cost more PP.
All of my contributions should be considered released under creative commons attribution share-alike license, CC-BY-SA 3.0 for use in, by and with the Free Orion project.

User avatar
labgnome
Juggernaut
Posts: 833
Joined: Mon Mar 02, 2015 5:57 pm

Re: Missile/Projectile Weapons

#49 Post by labgnome »

Ophiuchus wrote: Sat Jan 25, 2020 3:54 pm
@labgnome did you have a chance to try the missiles implementation?
I tried to test it out but get error messages in universe generation.
All of my contributions should be considered released under creative commons attribution share-alike license, CC-BY-SA 3.0 for use in, by and with the Free Orion project.

User avatar
Oberlus
Cosmic Dragon
Posts: 5715
Joined: Mon Apr 10, 2017 4:25 pm

Re: Missile/Projectile Weapons

#50 Post by Oberlus »

labgnome wrote: Sun Feb 09, 2020 2:28 am I tried to test it out but get error messages in universe generation.
Did you pull also the prerequisite PR#2698?

User avatar
Oberlus
Cosmic Dragon
Posts: 5715
Joined: Mon Apr 10, 2017 4:25 pm

Re: Missile/Projectile Weapons

#51 Post by Oberlus »

labgnome wrote: Sun Feb 09, 2020 2:26 amSo I'm not completely opposed to internal parts. I just want versatility/configurability in the system that your proposal does not supply if we are going to have two part missile system.
Oh, then this is a missunderstanding, I guess. I was only opposed to making them external-only, and I was sure you were opposed to using internal parts for ammo storage.

The stuff you propose now, with internal parts, seem to me as versatile and configurable as what I proposed before, but a bit awkward that some parts can be upgraded and some must be replaced within the same weapon system, so it's as if you have to replace both. But I haven't thought of it properly, need to sit down with it. Later.

User avatar
labgnome
Juggernaut
Posts: 833
Joined: Mon Mar 02, 2015 5:57 pm

Re: Missile/Projectile Weapons

#52 Post by labgnome »

Oberlus wrote: Sun Feb 09, 2020 10:40 am
labgnome wrote: Sun Feb 09, 2020 2:28 am I tried to test it out but get error messages in universe generation.
Did you pull also the prerequisite PR#2698?
I think so. I downloaded the whole thing.
All of my contributions should be considered released under creative commons attribution share-alike license, CC-BY-SA 3.0 for use in, by and with the Free Orion project.

User avatar
Oberlus
Cosmic Dragon
Posts: 5715
Joined: Mon Apr 10, 2017 4:25 pm

Re: Missile/Projectile Weapons

#53 Post by Oberlus »

Ophiuchus wrote: Sun Jan 12, 2020 11:16 pmSOTA FOCS-only fighters based implementation can only be shield-piercing. No way to stop a fighter from being shield-piercing. We could do 0-damage fighter implementation and count how many missiles got through and distribute that damage after combat between the enemies.. but let's rather not do that.

I did a FOCS-only implementation in PR-2710. Missiles launch in bout 1, can be shot down in bout 2 and do damage in bout 3. See details in the PR.

One thing I found is that the resupply seems to be hardcoded in the backend, so I can not put a specialized version for missiles in place. Timing of resupply also means I can not reuse fighter UI for showing the total amount of missiles available - supply happens after movement before combat. I first used the MaxCapacity of the hangar part to show the current storage - but it also meant that the launcher launched more missiles than it should have.

Another general thing with targeting conditions and UI and AI came up. Total damage calculation is off. Missiles do damage only once - but my targeting restricted fighter implementation does damage in bout two as well in UI and in AI estimation - so the estimation is double the real value.
I've checked out the implementation and thought of ways to improve what I don't like (some of the limitations you mention). I think there's no right way to do this FOCS-only.
I've been browsing CombatSystem.cpp code, particularly how fighters are handled. I think we can change it with little risks of screwing it up. I'm just skimming through it so most of this could be broken from start, but for now I see we would need:
  1. Add a new missile class (or type or whatever it is)
  2. There is a function Attack() that will need new AttackMissile*() and Attack*Missile subroutines.
  3. Add at the end of each AttackMissile*() function a call to attacker->SetDestroyed(), hopefully that would be all to implement the self-destruction on hit.
  4. In CombatRound(), add a third for loop over "attacker" that only process missiles, and make the second for loop ignore missiles in the if to ignore planets (processed in the first for loop).
I guess more stuff should be done, but if that would be mostly correct, it would have this advantages over the FOCS-only implementation:
  1. could use standard resupply and UI (if you don't add any ammo capacity to missile launchers, which I prefer as well as allowing several missile hangars per ship)
  2. would work for an arbitrary number of bouts (instead of just for 3 bouts)
  3. would not need the CombatBout ValueRef
  4. technically, missiles would attack at the end of the bout (after launch), but at the eyes of the player they would just in the same bout, which is more intuitive than on the next bout (they should be really slow compared to fighters for that to make sense)

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Missile/Projectile Weapons

#54 Post by Ophiuchus »

Oberlus wrote: Sun Feb 09, 2020 11:25 pm I've checked out the implementation and thought of ways to improve what I don't like (some of the limitations you mention). I think there's no right way to do this FOCS-only.
Yes if we change backend implementation we can do it right - the FOCS thingy is a TEMPORARY prototype which is intended to find out what is what we want. I also think that we should rather add direct support for missile systems as a new weapon category in the backend as I i think it will deviate too much from fighters/launchers. Until then people should try out the prototype to see the in game effects I think. For variation/exploration of design space one can fiddle with capacities. At the end of the design process we should have a decision:
  • missile can/cant be shot down
  • how resupply should work (e.g. we could also completely remove that capacity aspect - infinite missiles to shoot)
  • how multiple parts interact. how launching should work
My preference currently
  • missiles can be shot down before exploding (almost supported by the prototype, could be done perfectly in FOCS but too ugly/much hassle). What i am unsure of is if the number of bouts the missile should be vulnerable - e.g. instead of exploding on bout three it could explode on the last combat bout (so if you set five bouts per turn it means the damage is done in bout 5)
  • the ship has a launch capacity and a storage capacity, normal resupply mechanics (i.e. only in your own supply).
  • missiles launch only in bout one (supported by prototype). you can increase that launch capacity by extra launch parts. With at most one storage part you can increase storage (i.e. the launch parts bring some tiny storage capacity as well - e.g. only for a single turn). There may be a core storage part providing a lots (or even unlimitted) storage capacity.
  • missiles systems do not look like fighter systems. Im a bit torn here - i think from UI carriers should be able to be missile ships. OTH i am not sure we want mixed ship designs. Carriers mostly depend on internal slots and missile systems depend mostly on external slots.
The other possibility to first design and then implement is that somebody else steps forward and does the implementation. Things which need to be adressed: addition of part type in FOCS (parsers), cpp (structures, default target conditions etc, destruction of projectiles on the turn of impact), stringtables and AI. And i dont think the feature gets merged before its mostly complete. So I think the one doing this will also have to do the playtesting.

p.s.: long-term it would maybe nice to unify that fighters/missiles to generic launch parts but there are would be a lot of things to do
Last edited by Ophiuchus on Mon Feb 10, 2020 10:11 am, edited 2 times in total.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

User avatar
Oberlus
Cosmic Dragon
Posts: 5715
Joined: Mon Apr 10, 2017 4:25 pm

Re: Missile/Projectile Weapons

#55 Post by Oberlus »

Ophiuchus wrote: Mon Feb 10, 2020 9:31 amThe other possibility is that somebody else steps forward and does the implementation. Things which need to be adressed: addition of part type in FOCS (parsers), cpp (structures, default target conditions etc, destruction of projectiles on the turn of impact), stringtables and AI. And i dont think the feature gets merged before its mostly complete. So I think the one doing this will also have to do the playtesting.
I'll give it a try this weekend. I don't know C++ but I guess most of this can be done by mimicing the code on fighters and cannons, if whatever doesn't work in the end we could get some help from developers.

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Missile/Projectile Weapons

#56 Post by Ophiuchus »

labgnome wrote: Sun Feb 09, 2020 3:04 pm
Oberlus wrote: Sun Feb 09, 2020 10:40 am
labgnome wrote: Sun Feb 09, 2020 2:28 am I tried to test it out but get error messages in universe generation.
Did you pull also the prerequisite PR#2698?
I think so. I downloaded the whole thing.
That PR needs to be compiled. I thought that would be merged a month ago, but I did not emphasize it enough while we were in ramp down to 0.4.9 release.

Hope it will be in test builds next week.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Missile/Projectile Weapons

#57 Post by Ophiuchus »

labgnome wrote: Sun Feb 09, 2020 3:04 pm
Oberlus wrote: Sun Feb 09, 2020 10:40 am
labgnome wrote: Sun Feb 09, 2020 2:28 am I tried to test it out but get error messages in universe generation.
Did you pull also the prerequisite PR#2698?
I think so. I downloaded the whole thing.
Hey labgnome the current weekly builds contain the necessary backend changes. You should be able install that and use the downloaded default folder with it.

Note that missile storage is kind of confusing as it is not directly shown in the UI (it is 16 plus 4 per missile launcher, so if you have four launchers you can shoot missiles for two turns (16 each) if you are unsupplied). The values are set in default/scripting/ship_parts/FighterHangar/FT_HANGAR_MISSILE.focs.txt (just look for 16 and for 4).
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Missile/Projectile Weapons

#58 Post by Ophiuchus »

Some download options for the changes from PR-2710 (FOCS missile prototype). The given commands are for subversion (svn). github provides a folder-based download interface for svn.

If your download speed is good you can simply pull the complete default folder (contains lots of art) and point your game to that folder.

Code: Select all

svn export https://github.com/agrrr3/freeorion/branches/202001_FighterBasedMissile_FOCS_Prototype/default


As all changes are in the default/scripting folder it is actually enough to download that and put it in your locally used default folder.

Code: Select all

svn export https://github.com/agrrr3/freeorion/branches/202001_FighterBasedMissile_FOCS_Prototype/default/scripting
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

User avatar
labgnome
Juggernaut
Posts: 833
Joined: Mon Mar 02, 2015 5:57 pm

Re: Missile/Projectile Weapons

#59 Post by labgnome »

So I sort of got missiles to work, but I haven't been able to test them out. Apparently my computer doesn't like when I try to point the default folder to another directory. So I tried copying the default folder into my Free Orion directory. However it was very buggy. It's crashed on me twice and won't display the tech tree properly in the tree mode. But At least I got to design a ship with missiles.
All of my contributions should be considered released under creative commons attribution share-alike license, CC-BY-SA 3.0 for use in, by and with the Free Orion project.

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Missile/Projectile Weapons

#60 Post by Ophiuchus »

labgnome wrote: Mon May 18, 2020 9:58 pm So I sort of got missiles to work, but I haven't been able to test them out. Apparently my computer doesn't like when I try to point the default folder to another directory. So I tried copying the default folder into my Free Orion directory. However it was very buggy. It's crashed on me twice and won't display the tech tree properly in the tree mode. But At least I got to design a ship with missiles.
That is probably current test build, its buggy (sorry, should have mentioned that). Has nothing to do with the missiles folder.

Not sure if the week before was fine (or two weeks before).
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

Post Reply