Naval Mines and Landmines

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
Fulger
Posts: 6
Joined: Sat May 09, 2015 1:30 pm

Naval Mines and Landmines

Postby Fulger » Sat May 09, 2015 1:54 pm

Hey Folks,
i am new to freeciv and this forum, but i modded years ago for civ2 so i am not a complete noob :mrgreen:
For my personal modpack i want to have units such as claymores or drifting mines. I figured out how to change units in freeciv but i have some questions to the experts here.
My suggestion is WIP, so don't be too harsh (The hitpoints are too much, i know...) ;)

naval_mine.png
naval_mine.png (2.42 KiB) Viewed 5446 times

Naval Gfx by Pesloco and me

Code: Select all

[unit_navalmine]
name          = _("Naval Mine")
class         = "Sea"
tech_req      = "Steel"
obsolete_by   = "None"
graphic       = "u.navalmine"
graphic_alt   = "-"
sound_move    = "m_submarine"
sound_move_alt = "m_generic"
sound_fight   = "f_submarine"
sound_fight_alt = "f_generic"
build_cost    = 60
pop_cost      = 0
attack        = 0
defense       = 12
hitpoints     = 30
firepower     = 2
move_rate     = 1
vision_radius_sq = 2
transport_cap = 0
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 0
cargo         = 0
flags         = "Partial_Invis", "No_Land_Attack", "Undisbandable", "Trireme", "Helicopter", "Unbribable"
roles         = "DefendGood"
helptext      = _("\
Mines can only be deployed close to land \
They can close passages on the sea or\
defend towns at the coast.\
")


To get it work good, the flags are the key i think...
Let me explain my thinkings beyond the choosen flags:

Partial_Invis : like Submarines, they should be like invisible.
No_land_Attack: The Naval Mine can only attack naval units.
Undisbandable: It's a technical unit- it can last for over 70 years in the sea.
Trirerme: It makes no sense to deploy them in the middle of the atlantic (ok... we could discuss that)
Helicopter: My try to get it weak against Air Units- not really genious i think... Is there sth. better?
Unbribable: It's a technical unit...

Questions:
I don't like it when my mine is defending against air units. Air units should be able to destroy the mines completely without getting harmed. How can i do this?
In my concept it's a unit which can only defend. Should it be switched to only-attack?
What would you think about the paratrooper skill? It would sim. that it can be thrown out of the sky...
I am not really experienced in the values of the units. Should it be as hard as cruise missiles, or different?
Especially the helicopter skill is not really good- is there sth. better?
Has anyone any suggestions?


Thanks for reading and it would be kind to write back :)
Fulger

cazfi
Elite
Posts: 1720
Joined: Tue Jan 29, 2013 6:54 pm

Re: Naval Mines and Landmines

Postby cazfi » Sat May 09, 2015 2:47 pm

I'll think that a bit, but first I need to know if this is something where we can assume freeciv-2.5 at least, or is there some pressing need to get something that works on freeciv-2.4? I'm especially thinking about the combat bonus framework that was introduced in 2.5. That you take "Helicopter" as an hardcoded property sounds like you're talking about 2.4 (or earlier) here.

Fulger
Posts: 6
Joined: Sat May 09, 2015 1:30 pm

Re: Naval Mines and Landmines

Postby Fulger » Sat May 09, 2015 2:53 pm

Hey cazfi,
i have done it with version 2.3.2. Isn't it a good version?
The main question for naval mines is, is it possible to generate a unit which is a strong attacker or defender against naval units but can be easyly destroyed by air Units? I took helicopter, because i think there the air bonus is very low. If i understood it right... :?: Or is ist impossible to be a sea unit and helicopter as a flag in freeciv?

cazfi
Elite
Posts: 1720
Joined: Tue Jan 29, 2013 6:54 pm

Re: Naval Mines and Landmines

Postby cazfi » Sat May 09, 2015 3:05 pm

Fulger wrote:i have done it with version 2.3.2. Isn't it a good version?

It's definitely not the latest. It's not even the last of the no-longer-maintained 2.3 series (there was several bugfix releases after it)

Between freeciv release series there usually is huge improvements in moddability.
Also the 2.4 series is going end-of-lifed soon, but here are the major improvements it provided over 2.3: http://freeciv.wikia.com/wiki/NEWS-2.4.0
Freeciv-2.5 is the current release series (with just the 2.5.0 release out), and here's what it provides over 2.4: http://freeciv.wikia.com/wiki/NEWS-2.5.0

Freeciv-2.6 is still in development (and so is 3.0 to follow it)

Fulger
Posts: 6
Joined: Sat May 09, 2015 1:30 pm

Re: Naval Mines and Landmines

Postby Fulger » Sat May 09, 2015 3:14 pm

Ok. So i will convert it to 2.5 and test some things. Thanks for the information!
If you have any idea for my unit, just tell me :)

Fulger
Posts: 6
Joined: Sat May 09, 2015 1:30 pm

Re: Naval Mines and Landmines

Postby Fulger » Sun May 10, 2015 9:58 am

Ok, new try with v 2.5 :D

Code: Select all

[unit_navalmine]
name          = _("Naval Mine")
class         = "Sea"
tech_req      = "Steel"
obsolete_by   = "None"
graphic       = "u.navalmine"
graphic_alt   = "-"
sound_move    = "m_navalmine"
sound_move_alt = "m_generic"
sound_fight   = "f_navalmine"
sound_fight_alt = "f_generic"
build_cost    = 50
pop_cost      = 0
attack        = 0
defense       = 8
hitpoints     = 10
firepower     = 1
move_rate     = 12
vision_radius_sq = 2
transport_cap = 0
fuel          = 0
uk_happy      = 1
uk_shield     = 1
uk_food       = 0
uk_gold       = 1
flags         =  :?:  :?:  :?:
roles         = ""
helptext      = _("\
Mines can blockade passages.\
")


I tested many flags, but i can't find a combination which is the behaviour of a naval mine. Some suggestions for flags:

OneAttack
Missile
Partial_Invis
Paratroopers
Only_Native_Attack
Unbribable
Undisbandable
Trireme

The possibility for air units to get harmed by a naval mine is the biggest problem. Any ideas?

cazfi
Elite
Posts: 1720
Joined: Tue Jan 29, 2013 6:54 pm

Re: Naval Mines and Landmines

Postby cazfi » Sun May 10, 2015 10:40 am

Fulger wrote:move_rate = 12
That's one very fast mine.
Fulger wrote:Trireme
Yes, that restricts them to near coast. Note though that even Triremes do not use that flag in most rulesets, but are allowed in "Ocean" terrain only (not in "Deep Ocean")

Fulger wrote:The possibility for air units to get harmed by a naval mine is the biggest problem. Any ideas?

Combat bonuses should help.

If the air unit is the defending unit, you could give it a high DefenseMultiplier bonus against mines
If the air unit is the attacking unit, you could give it a high DefenseDivider bonus against mines.

If the air unit is the attacking unit, you should even be able make it to always win without hp losses: make mine defense multiplier zero (by giving air unit combat "bonus" of -1 to DefenseMultiplier against air units)

Fulger
Posts: 6
Joined: Sat May 09, 2015 1:30 pm

Re: Naval Mines and Landmines

Postby Fulger » Sun May 10, 2015 11:24 am

Awesome! Thank you man! I made it with this code in the air units:

Code: Select all

bonuses       =
   { "flag", "type", "value"
     "Mine","DefenseDivider", 99
   }


I just had to find out where to set new flags, but now it works!
Next unit i am planning is a bunker crew, which can set up a static bunker on the field :mrgreen:

User avatar
XYZ
Elite
Posts: 364
Joined: Fri Jan 31, 2014 12:00 pm

Re: Naval Mines and Landmines

Postby XYZ » Sat Jan 07, 2017 6:27 pm

Any chance naval mines will be introduced into the main game?

bard
Veteran
Posts: 110
Joined: Fri Jun 14, 2013 2:00 pm

Re: Naval Mines and Landmines

Postby bard » Mon Apr 03, 2017 10:47 pm

I'm going to add naval mines to my ruleset, as an extra that reduces the hit points of adjacent naval units (at the end of the turn), and can be pillaged by enemy air units.
I'll credit the gfx to Pesloco and Fulger. If the author could confirm that the image can be used with GPLv2 license, I think there will be more chances that they can include it in future releases.
Thank you Fulger.