New Bombard 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
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: New Bombard weapons

#16 Post by MatGB »

Specifically, from shipparts.txt

Code: Select all

Part
    name = "SP_CLOUD"
    description = "SP_CLOUD"
    class = General
    mountableSlotTypes = Internal
    buildcost = 1
    buildtime = 1
    location = All
    effectsgroups = [
        EffectsGroup
            scope = NumberOf number = 1 condition = And [
                Planet
                InSystem id = Source.SystemID
                Not Planet type = [Asteroids GasGiant Barren Desert]
            ]
            activation = And [
                Random probability = 0.15
                InSystem
            ]
            effects = AddSpecial name = "CLOUD_COVER_MASTER_SPECIAL"
Not sure how it then chooses within available options but that's the basics of the code needed.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: New Bombard weapons

#17 Post by Geoff the Medio »

MatGB wrote:Not sure how it then chooses within available options but that's the basics of the code needed.
If you don't specify a sort key and sorting method, then NumberOf should pick the specific number of objects randomly from whatever matches the condition.

https://github.com/freeorion/freeorion/ ... n.cpp#L650

spikethehobbit
Space Squid
Posts: 66
Joined: Mon Aug 27, 2012 7:24 pm

Re: New Bombard weapons

#18 Post by spikethehobbit »

I'm testing this now. If it works, I'll push it out to github.

Also, git rebase officially sucks. Those oddball copypasta errors? That's what did it. :(
All contributions are submitted under GPL or LGPL v2 or later, or under appropriate Creative Commons licence, consistent with project guidlines.

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: New Bombard weapons

#19 Post by Vezzra »

spikethehobbit wrote:I'm testing this now. If it works, I'll push it out to github.
Ok, so we'll hold off further testing/merging your PR until you update your branch. Pls post a notification here when you've done that, because github doesn't send out notifications when the branch of a PR gets updated/rebased.
Also, git rebase officially sucks.
Really? What problems exactly did you ran into? I've found git's rebase to be a very powerful and helpful thing... of course when you have to resolve conflicts it can get tedious, but merge isn't any better...

spikethehobbit
Space Squid
Posts: 66
Joined: Mon Aug 27, 2012 7:24 pm

Re: New Bombard weapons

#20 Post by spikethehobbit »

git rebase is powerful, and usually works very well, but sometimes it screws up without warning. It has managed to eat ship_parts.txt twice now without detecting a conflict. Not fun.

In any case, it seems to be working as of latest master. Now to decide which monsters get which new weapons. Any suggestions would be much appreciated.
All contributions are submitted under GPL or LGPL v2 or later, or under appropriate Creative Commons licence, consistent with project guidlines.

spikethehobbit
Space Squid
Posts: 66
Joined: Mon Aug 27, 2012 7:24 pm

Re: New Bombard weapons

#21 Post by spikethehobbit »

Weapons are assigned to monsters now. The patch is ready to apply.

A few (possibly related) issues remain with bombardment:
1) Killing population should prevent growth that turn, especially if it is reduced to 0. At present, max pop planets whose growth rate is greater than the attack strength are not affected by bombardment.
2) Sometimes population will return after it has been wiped out. This might be a display error.
3) Ships assigned to bombard will show in the client as still bombarding on the next turn, but don't actually do anything. To get them to bombard two turns in a row, the player must cancel bombardment /twice/ and then command bombardment again.

All three together makes it difficult to reliably exterminate a planet.
All contributions are submitted under GPL or LGPL v2 or later, or under appropriate Creative Commons licence, consistent with project guidlines.

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: New Bombard weapons

#22 Post by Vezzra »


Post Reply