FreeOrion

Forums for the FreeOrion project
It is currently Thu Sep 09, 2010 9:27 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Build on Unowned Planet
PostPosted: Wed Sep 02, 2009 3:29 am 
Offline
FreeOrion Creative Team
User avatar

Joined: Tue Aug 14, 2007 6:33 pm
Posts: 931
Location: Orion
Should this go on SourceForge under Feature Request? I dunno, but here goes:

Currently, there is no way to build a building on an unowned planet. This seems to be more of a UI thing than anything else and would be relatively easy to fix (afaik) if one was so inclined. The reason this would be nice is so that we could do this with asteroid mines:

BuildingType
name = "BLD_ASTEROID_MINE"
description = "BLD_ASTEROID_MINE_DESC"
buildcost = 1
buildtime = 1
maintenancecost = 1
location = And [
Planet Asteroids
ContainedBy Contains OwnedBy TheEmpire Source.Owner
]
effectsgroups = [
EffectsGroup
scope = ContainedBy And [
Contains Source
Contains Planet Asteroids
]
activation = OwnerHasTech "PRO_ASTEROID_MINE_II"
stackinggroup = "ASTEROID_LOCAL_EFFECT"
effects = SetMaxMining Target.MaxMining + 8

EffectsGroup
scope = ContainedBy And [
Contains Source
Contains Planet Asteroids
]
activation = OwnerHasTech "PRO_ASTEROID_MINE"
stackinggroup = "ASTEROID_LOCAL_EFFECT"
effects = SetMaxMining Target.MaxMining + 4
]
graphic = ""

Note the change in the location specification. If I could select asteroid belts in the production screen, I could use this to build multiple asteroid mines in a system with multiple asteroid belts. However, this would probably require getting rid of the stackinggroup and replacing it with a way to actually limit the player to one mine per belt... If this is all nonsense, feel free to tell me and ignore my request, of course; I know next to nothing of how the text files work - I only started browsing through them today.

BTW, by switching the order of the effectsgroups and changing the effect of the first group to +8, I was able to fix the problem of advanced asteroid mines not doing anything. The stacking effect was blocking the advanced asteroid mines even when I just switched the second effects group to +8 because it was being fed the lower number first. Maybe the stacking effects should be reworked so only the highest number is used, not the first number.

_________________
Warning: Antarans in dimensional portal are closer than they appear.


Top
 Profile  
 
 Post subject: Re: Build on Unowned Planet
PostPosted: Wed Sep 02, 2009 4:42 am 
Offline
Designer and Programmer
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 4771
Location: Vancouver, BC
Bigjoe5 wrote:
Should this go on SourceForge under Feature Request?

The "let me pick a planet I don't own as a production location" part is a feature request.

Quote:
Currently, there is no way to build a building on an unowned planet. This seems to be more of a UI thing than anything else and would be relatively easy to fix (afaik) if one was so inclined.

It's actually coded specifically to not let you select unowned planets. What we really need is a smarter production screen that disables selection of planets where the selected production item can't be built, or which hides / disables production items that can't be built at the selected planet, and a way to switch between these modes easily.

Quote:
I know next to nothing of how the text files work - I only started browsing through them today.

You seem to have figured out the basics of building and effect scripting.

Quote:
BTW, by switching the order of the effectsgroups and changing the effect of the first group to +8, I was able to fix the problem of advanced asteroid mines not doing anything. The stacking effect was blocking the advanced asteroid mines even when I just switched the second effects group to +8 because it was being fed the lower number first. Maybe the stacking effects should be reworked so only the highest number is used, not the first number.

It might be better to have two separate stacking groups, one for the basic mine effect and another for the advanced mine effect.

If the desired situation was that mines give +4 with just mining researched, and +8 with advanced mining researched, then both effects would give +4. The downside to this is that it would probably show up as two identical but separate items in the effects accounting tooltip, each giving +4 with no indication of why that line is duplicated.

The reason I suggest this is that I'm not sure whether or not order of effects groups listed in the building / tech / whatever definition guarantees that the first effects group will be applied first and thus take priority in stacking limitation situations. It may work in practice, but I'd prefer to be safe. (And it might actually be safe as well as working always... I'm not sure.)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group