Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Corellon

Pages: [1] 2 3 ... 6
1
I would say I've done a pretty good job of keeping it up to date, I don't really want to put it up on svc or github as there is no one else contributing and if it's open to all it's bound to become mangled.

2
They should adjust to ore being depleted but looks like one of my own changes (I usually play without ore depletion) got into the main branch.

In planet.as you should see a line right near the top of the file called

float deadOreRate = 1;

change that to float

deadOreRate = 0.2f;

Or used the attached planet.as file.

Thanks

3
Scripting / Re: Finding a retrofit order
« on: September 25, 2011, 09:11:08 PM »
If It's in OnDestory() and I loop orders.getName() into a warning it never lists a retrofit or scuttle warning (Issued by clicking unit then right clicking planet) it lists fetch fuel, fetch ammo and defend system only, orderlists.hasOrder(OrdT_Retrofit) also always is false.

Code: [Select]
bool onDestroy(HulledObj@ ship, bool silent) {
Object@ shipobj = ship.toObject();
Empire@ from = shipobj.getOwner();
if( from.isAI())
return false;
Planet@ target = ship.inOrbitAround();
if( @target != null && @from != null )
{

const HullLayout@ shiplayout = ship.getHull();
if( shiplayout.hasSystemWithTag("Station") || shiplayout.hasSystemWithTag("StationOrCarrier"))
{
OrderList orderlists;
bool orderfail  = orderlists.prepare(shipobj);
if(!orderfail)
      return false;
Order@ orders = null;
OrderType Otype;
uint OrdCount = orderlists.getOrderCount();
if(OrdCount > 0 )
{
warning("Destory order is > 0");
for (uint ord = 0; ord < OrdCount; ++ord)
{
@orders = orderlists.getOrder(ord);
warning("Order is "+orders.getName());
Otype = orders.getType();
if( Otype == OrdT_Retrofit || Otype == OrdT_Scuttle )
return false;
}
}
Object@ targetobj = target.toObject();
Empire@ Player = shipobj.getOwner();
if( shiplayout.getLatestVersion() is Player.getShipLayout("Military Outpost") )
{
string@ sat = combine("Empire",i_to_s(from.ID),"stations");
State@ stations = targetobj.getState(sat);
float curval = stations.val;
stations.val = curval - 1;
}
else if( Player.ID == from.ID)
{
                                warning("Rebuilding");
targetobj.makeShip(shiplayout.getLatestVersion());
}
}
}
return false;
}

That's the full code block I used and it never finds a retrofit or scuttle order, used to for me up to 1.0.8.2 or 1.0.9.0 but now it doesn't, It warns orders are > 0 and then warns rebuilding.

4
Scripting / Re: Finding a retrofit order
« on: September 25, 2011, 04:55:08 PM »
Thanks for answering, then is there any way to tell if a ship is destined to be retrofited or scuttled? I've tried just dealing with onOwnerChange but sometimes a ship just skips and goes into the onDestroy function directly.  OnOwnerChange isn't a issue but the onDestory doesn't seem to have anything I could work with, the order just isn't in the list.

5
Modding / Re: Galaxies Size
« on: September 25, 2011, 04:52:04 PM »
I think he might be referring to the size of the galaxy (Width, Height, etc) and while it's probably possible for the dev's (using code changes you can get around floating point limitations if you split the integer from the fractions) modding in most cases wouldn't probably.

6
Modding / Re: sharing your savegames
« on: September 25, 2011, 04:47:02 PM »
Sharing save games is possible so long as the same files are used (Stock to stock, GA to GA, etc) if you mod files the other person needs those (in general) same files but other then that just sharing the .srs file is all you have to do.

As for your other idea it may be possible but with alot of effort of modding.  I can't confirm 100% but it likely is possible to generate a 30 system galaxy with custom edits to the win/lose clause so that the AI's exist but in a "paused" state with no worlds.  Once a condition (time, system count, etc) is reached to then generate the rest of the galaxy and assign and distribute it to the AI.

Would take alot of work but I think it could be possible.

7
Scripting / Re: Finding a retrofit order
« on: September 25, 2011, 03:15:03 PM »
is .getFlag(objQueueDestroy) only true if being destoyed at a planet or construction ship? (something with a queue?) appears so but want to confirm.

Thanks

8
Version 1.6 is finally up, workaround for the non-military outposts rebuilding if scuttled or retrofited is in place, 99% tested out so hoping this will solve the issue.

FRB version should work with 2.1.3b since the files that I use don't seem to have changed but if anyone can confirm it would be appreciated. Also fixed a mulitplayer crash where the server starts game time at 1 second and the client starts at 0 seconds resulting in a divide by 0 error on the client.

9
Scripting / Re: Finding a retrofit order
« on: September 23, 2011, 07:06:31 AM »
No one able to give a pointer? Still can't locate a method myself that works reliably.  Was hope someone might have a suggestion

10
Scripting / Finding a retrofit order
« on: September 19, 2011, 07:03:48 PM »
Code: [Select]
OrderList orderlists;
bool orderfail  = orderlists.prepare(shipobj);
if(!orderfail)
return false;
Order@ orders = null;
OrderType Otype;
uint OrdCount = orderlists.getOrderCount();
if(OrdCount > 0 )
{
warning("Destory order is > 0");
for (uint ord = 0; ord < OrdCount; ++ord)
{
@orders = orderlists.getOrder(ord);
Otype = orders.getType();
if( Otype == OrdT_Retrofit || Otype == OrdT_Scuttle )
return false;
}
}
Trying to detect if a ship is being scuttled or retrofitted, it used to work in 1.0.9.0 but since 1.1.0.0 orders seem to have been changed? when I run that code it checks the orders, sees the orders but never finds a retrofit or scuttle order even though the ship is being scuttled or retrofited.

What am I doing wrong? code worked great for 1.0.8.2 and I think 1.0.9.0 but now I have to add more null pointer checks (Orderlists.prepare would fail on me for some reason) and it never finds the retrofit or scuttle order

11
Modding / Re: [Released] Smart Gov v1.5 - 1.1.0.0, GA 1.8.1 and FRB 2.1.2
« on: September 19, 2011, 05:35:31 PM »
I Don't see why it would build spaceports, but did notice a issue with it filling with shipyards? Used the wrong tag in the XML and used BuildNper=1 instead of BuildNcount=1 (So instead of building 1 it would build 1 per every 1 slot....)

It only affects the GA version.

I'll update the GA zip to include the corrected file. Other then the shipyards I don't see a reason myself the script doesn't even get called till the planet is full (Since it only handles defenses, lux and goods aren't implemented or need to be optimized).

12
Modding / Re: [Released] Smart Gov v1.5 - 1.1.0.0, GA 1.8.1 and FRB 2.1.2
« on: September 17, 2011, 06:31:37 PM »
I understand now, it's non "Military outpost" stations.  I see, guess the issue with retrofit orders not being reliably being detected is creeping in again.

I'll try to find a workaround and see if I can detect the retrofit or scuttle order.

Sorry

13
Modding / Re: [Released] Smart Gov v1.5 - 1.1.0.0, GA 1.8.1 and FRB 2.1.2
« on: September 17, 2011, 05:17:19 PM »
Exelsiar:

The same issues with station production? Or when retrofitting? Are you running stock or GA (sorry can't remember), did you start a new game with 1.5? do you have a save game you could attach I could look at to track down why it's happening because it doesn't for me and it should never build anything while something else is being retrofitted, unless another station is doing the retrofiting maybe (If that planet doesn't do the retrofit but a station or drydock does the retrofit it might mess with the counter (Last version of stock changed orders and now I can no longer reliably check for the retrofit command)?

14
Modding / Re: Modding the Build Queues
« on: September 15, 2011, 09:26:26 PM »
Puzzled it over a while but wasn't too bad compared to figuring out what some of the AS scripts actually expect/do/return

if it returns false it means the script didn't do anything and tells the .xml to move to the next line, if it returns true it tells the engine that the script did something and that it should teminate the existing run and start from the top again (pausing while the queue is still running) this is to prevent further runs from the script from unexpected behaviour due to buildings being built but not counted (the .xml only counts built buildings not under construction ones (Since it assumes the queue is empty because of the first line in the XML (waitempty)))

In short:
False - Continue with the next line in XML
True - Terminate and start from the top again

15
Mod Releases / Re: Looking to join a project. Programmer.
« on: September 15, 2011, 09:18:38 PM »
(small) I don't have smart governors for my mod yet, but I'd rather just fix the bug which makes smart governors so important. Metal Mines use a population multiplier, but Star Ports do not. Can you can figure out how to change that?

In planet.as just change: float tickTrade = tradeRate.val * time * lackOfWorkers; to float tickTrade = tradeRate.val * time * lackOfWorkers * workRate;

(medium) I'd like to make the galactic bank more concrete. I want to store goods in orbital stations. This means planets export to the stations, and vice versa. These stations are more discoverable than specialized lux/goods planets ever were, and makes blockades more interesting.

Basicly you want to remove the spaceport structure and replace it with a subsystem on a station? Use a Effector to "Beam" Resources to/from the planet? (No need to have anything on the planet, the station could check for import and export)

(medium) I'd like to make ore more concrete. Right now planets have unlimited ore, which seems wrong. Also, planets can be killed by a million small potshots, which seems unrealistic. Instead I'd like to have planets heal hitpoints up to the amount of ore they have. Mining removes ore, eventually leaving the planet a large, mined out husk for shipbuilding/farming/research. Husks are very weak against attack.

You could just add a regen function to the planet.as tick() function to heal based on the remaining ore.

(large) I want to add fuel/energy as a more real resource. I've never built a fuel depot in this game, so fuel seems rather fake. I want to create several tiers of energy production and storage. I'll detail that below.

Production facilities will be, in order, planet chemical extractors, planet fission extractors, and ship solar concentrators. All facilities are available at every tech level, but lower tech production facilities have higher production rates at level 1. The level-up curves are different based on different multipliers (e.g. chemical could be ^1.3, fission ^1.35, solar ^1.4) so that higher tech facilities make more sense over time.

Ship energy storage will be unlocked in a more traditional manner. In order they are chemical storage (+ chemical engine), fission storage (+ reactor), antimatter storage (+ reactor). These technologies don't scale down very well, so batteries are also available for smaller ships. Batteries store less energy, require a reactor, and don't have 'production rates'. They are thus good for local defense but not for long range exploration. Energy from any production facility may be used in any storage, in an abstract way because I don't care for that level of detail.

If any production facility could used in any storage and device why have 3 separate fuels? Just have the level curve with the new systems using the existing fuel but making it scarcer. If you want 3 separate fuels then you'll need 3 resources which would make them unique for storage and use.

16
Modding / Re: [Released] Smart Gov v1.5 - 1.1.0.0, GA 1.8.1 and FRB 2.1.2
« on: September 15, 2011, 09:06:53 PM »
1.5 is released based on a 100% working and balanced playthough of my own game, I didn't run into any issues and I don't think any of the last minute changes (Gui mostly so either works (which it did) or doesn't (but it did)).

New game is required since the build_queue.xml file has been tweaked and balanced yet again, expectially in the GA and FRB versions.
GA now will properly track stations being built (at the expense of a little extra CPU time since it has to check everything with a stationorcarrier tag (Maybe GA could just add back in the old station tag in addition to the ones they use?)

once again I can't stress this enough, a new game is REQUIRED!!! not only because of the xml file but several tracking stats where changed and how they were tracked which would cause the gov to loose track of many things it remembered previously.

17
Well you sure your not looking at slots instead of sats? that would mean you were playing for 300 minutes or about 5 hours?

If you have build stations off then it shouldn't be building any at all even though you have 1 ever 10 (minutes) also it uses the layout "Millitary outpost" for the defenses so customize that one if you want them auto built (and enable the setting)

I'll hopefully get the next update out today or tororrow since it's my days off now.

18
Exelsiar:

I'll look into it, that's odd behavior since it shouldn't build a extra unless needed, does the gui show the sats count going beyond the needed limit? such as sats 5/4? script shouldn't even build a extra since the planet is busy with the retrofit and won't run the script till the queue is empty (in which case the station would have been built)

19
Hedge:

It's a issue that was just brought to my attention a little while ago in another thread, GA apparently changed station tags so the gov never counts the station, the button being cut in half seems to be another issue as well with the window needing to be resized I guess.

Experiencing some issue with my computer at the moment so will hopefully get the updates up soon.

20
Modding / Re: Automated rebuilding of defenses V2
« on: September 12, 2011, 06:43:06 AM »
I see, I'll update the GA version then to use the stationorspinalmount tag instead then, thanks.

21
Modding / Re: Automated rebuilding of defenses V2
« on: September 11, 2011, 08:46:44 PM »
Azalrion: Thanks for answering his question

Don_Lexone: For a updated version look at the smart gov mod that I have that combines a improved version of this with governors that will keep production optimized on planets (If you don't want the smart gov then you could probably get the same defense only gov by replacing all the calls in loadgov() with calls to the build station function.

22
Should just be able to overwrite the GA files with the files from the zip (The smart gov GA zip).

It shouldn't attempt to build farms unless your in a low food situation, check to see if the planet is short of food (less the 40% in storage).  I haven't actually played GA so rely on feedback to see if it works 100%, I only even get time to play a game myself every couple months. 

23
The thread is here http://forums.blind-mind.com/index.php?topic=4227.0 It's a work in progress got stalled when till I could figure out the missile issue, I have some other ideas I hope to add in and start getting the base going and have many plans for tweaking the AI like I've done with the smart gov.

24
Well finally got a chance to play again and have to say I'm loving it, found a few relatively minor issues and came up with a couple new ideas and improvements so going to roll the hotfixes and the changes into a 1.5 build (See the change log for whats going on, anything else you want improved/changed/added let me know so I can hopefully get it into 1.5)

Loved the fact that when I take over a planet no longer have to worry about cleaning the Queue of capitals or AI ships (Don't get the blueprints but I don't really care myself) governors seem balanced to me and haven't come across any looping issues (Other the one with farms and high tech level cargo blocks but that fixes itself) one change I made for myself was changing cargoblocks from having cargo to being pure ecostorage (I didn't like the fact that it would pick random resources to carry a surplus of) storage is the same but the previous "cargo" definition got divided back into resources so it stays balanced (stock would bleed my empire dry by always using "Cargo" to store tons of extra food)

I'll see about updating to the latest FRB at the same time too, after this going to concentrate on my AIR mod which is slowely coming along and hope to be able to offer a different experience to FRB or GA.

25
Scripting / Re: CTD and reading minidumps
« on: September 08, 2011, 10:52:58 AM »
Well that beats all, I'm at a loss of where to look since it happends randomly and doesn't seem to be triggered by anything specific, guess I'll try to isolate files one by one to see what the cause is.

26
Scripting / Re: Jump Drive and evt.source.system
« on: September 08, 2011, 10:45:38 AM »
Have you tried evt.obj.get_source().get_system()?

27
Scripting / CTD and reading minidumps
« on: September 08, 2011, 10:39:37 AM »
Could someone with more experience help point me in the right direction as to what is causing my CTD's? nothing I add to my scripts seems to trigger a warning before the crash, log doesn't show anything except for making a minidump so I'm at a loss.

Is there a way to read the minidump to tell what script is causing the crash? Attached is a dump.

I'd love to learn how to read them myself if anyone can give a pointer, I'm thinking it may be a thread safety issue myself but not sure where to look, I haven't even had any problems with the same script before and now it's happening all the time.

28
Rosseau:

Well the easiest way to use the mod is to unzip the smart gov directory into the /mods directory instead of overwritting the original files.

From there you start a new game and choose the smart gov game type instead of standard.

To tell if the mod is running click the empires button and there should be a new tab there called smart gov, if it's there the mod is runnning if it's not then it's not running

29
Modding / Re: How are script functions defined/used?
« on: August 28, 2011, 06:40:32 AM »
Well once I figured out that effectors are what apply effects onto other targets I traced down the effects and then found what they cause, looked the function up on in the script and noticed all the values accepted are listed as values to the effect.

Just remember if you want it to affect a target rather then the ship/planet calling it (I'm pretty sure) it has to be a effector which calls the effect that you want caused on the target.

30
Modding / Re: How are script functions defined/used?
« on: August 27, 2011, 08:36:50 PM »
For example a weapon from weapons.txt:
Code: [Select]
System: TorpedoBay
Name: #SS_TORPEDOBAY_NAME
Description: #SS_TORPEDOBAY_DESC
Appearance: TorpedoBay
Explosion: fuel_cell_explode lasting 0.4

Available: Techs.Missiles.Level > 4
Level: Techs.Missiles.Level
Size: max(Scale,1)
HPLevel: Techs.Materials.Level-1 As Level
Durability: 100 * Size * pow(HEALTH_CURVE,HPLevel) * HEALTH_MULT
Mass: 80 * Size

Tags: Weapon
Tied To: Missiles 5

Costs: Metals[150 * Size], Electronics[50 * Size], Labr[5 * Size]
Complexity: 1.2

vTorpDamage: Size * 60 * pow(LEVEL_GAIN_CURVE, Level) * GAME_DAMAGE_MULT
vTorpDelay: max(5, 10 * decay(pow(LEVEL_GAIN_CURVE,Level),15) * decay(Size,50)) * ((sqrt(1 + Size) / 5) + 1)
vDeviation: 0.1
vTorpRange: progress(250,3*LEVEL_GAIN_CURVE,Level) * ((sqrt(1 + Size) / 10) + 0.85)
vTorpSpeed: progress(33,2*LEVEL_GAIN_CURVE,Level)
vTorpUse: Size * 24

Provides: ExplosiveWeapon with Damage[vTorpDamage], Delay[vTorpDelay], AmmoUse[vTorpUse], Range[vTorpRange], Speed[vTorpSpeed], Deviation[vDeviation]

Provides: AmmoStorage with Amount[vTorpUse * 2]

Requires:
To Run:
Control[10 * Size]

Hints: Ammo[vTorpUse], AmmoUse[-1 * vTorpUse / vTorpDelay], Local/AmmoperShot[vTorpUse], DPS[vTorpDamage / vTorpDelay], Local/Range[vTorpRange], Local/DMGperShot[vTorpDamage], Local/ProjSpeed[vTorpSpeed], Local/Delay[vTorpDelay]

Key line is Provides: ExplosiveWeapon with Damage[vTorpDamage], Delay[vTorpDelay], AmmoUse[vTorpUse], Range[vTorpRange], Speed[vTorpSpeed], Deviation[vDeviation]

Then goto effectors.txt

Code: [Select]
Effector: ExplosiveWeapon
Value: Damage
Value: Delay
Value: AmmoUse
Value: Range
Value: Speed
Value: Deviation

Range: Range
ProjectileSpeed: Speed
PotentialDamage: Damage

PhysicalType: Bullet
Material: rocket
GfxSize: 0.25
GfxColor: fff
Sound: torpedo
HitGfx: torpedo_impact, 0.40
FireGfx: missile_gas, 0.25

Causes: ExplosiveDamage lasting 0 with Damage[Damage]

AutoAttack: Enemy
CanAttack: CanAttack
OnFire: TimedShot(Delay, "Ammo", AmmoUse, Deviation)
Tick: Reload
Progress: TimedProgress

Tells you that it the effector name (Explosiveweapon) and the values that i takes (see how they match weapons.txt?)

then it calls the script that it causes: ExplosiveDamage lasting 0 with Damage[Damage].

from effects.txt
Code: [Select]
Name: ExplosiveDamage
Value: Damage

OnActive: Combat::ExplosiveDamage

Which calls the script ExplosiveDamage from combat.as with the value of damage, so ExplosiveDamage(Event@ evt, float damage) (the Event@ evt is a event that is passed to all calls in addition to the values specified)

Does that help?

In short the:
Code: [Select]
Value: Metals
Value: Electronics
Value: AdvParts
Value: Food

Part of the CapitalSupport is passed to the StructureEffects::PlanetCapitalTick in addition to Event@ evt. if you remove the Value: Metals it won't pass it to the script anymore either (Except you have to remove that from any other effector that references the effect CapitalSupport

Code: [Select]
Provides: CapitalSupport with Metals[Size * 50], Electronics[Size * 25], AdvParts[Size * 10], Food[Size * 1]would have to become
Code: [Select]
Provides: CapitalSupport Electronics[Size * 25], AdvParts[Size * 10], Food[Size * 1]

Pages: [1] 2 3 ... 6