Home Crush your enemies... and create an EMPIRE!!! Space Empires V -- BUY NOW!!!

User login

  • Create new account
  • Request new password

Navigation

  • news
    • archive
    • blogs
    • books
    • forums
    • recent posts
    • groups
  • image galleries
  • projects & downloads
  • search
  • create content
  • news aggregator

Search

Who's online

There are currently 4 users and 146 guests online.

Online users

  • Vince278
  • Captain Kwok
  • Faithful
  • Blubel

Languages

  • English English
  • French French

Browse archives

« Octobre 2008  
Lu Ma Me Je Ve Sa Di
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    
Home » news » forums » Support & Feedback » Scenarios & Mods » SE:V MODs

Spawning Sphereworlds and Ringworlds

Submitted by Corellon on Tue, 2008-05-06 14:32. SE:V MODs

Well it's probably been figured out before, but since I couldn't find anything posted here when I went about looking figured I'll post how to here for those who might be interested in getting sphereworlds, ringworlds or other constructs to spawn on map creation.

In SystemTypes.txt make a new system type to look like this:

Name := SpherWorld 1
Description := Standard solar system with a Ring World.
System Physical Type := Normal
Portrait Bitmap := System_Normal1.bmp
Portrait Picture Index := 1
Empires Can Start In := FALSE
Number of Abilities := 0
WP Stellar Abil Type := Normal Warp Point
WP Min Radius := 360
WP Max Radius := 400
Chance Type Used := Standard
Number of System Objs := 1
Obj 1 Physical Type := Planet
Obj 1 Position := Ring 1
Obj 1 Stellar Abil Type := Normal Planet
Obj 1 Specific Stellar Obj Name := Sphereworld 1
Obj 1 Size := Huge
Obj 1 Atmosphere := None
Obj 1 Composition := Rock

And 13 others with each Specific obj name incrementing up to 14 (all the listed sphereworlds in StellarObjectTypes.txt) with size being huge, and atmosphere and Composition matching the type listed in StellarObjectTypes.txt. The same can be done for Ringworlds or other userdefined constructs, This gets around the hassle of the game not spawning constructs and changing a sphereworld to not being a construct resulting in them appearing in any system (rather funny seeing a system with 4 sphereworlds and 3 ring worlds)

‹ Halo MOD Question: Making components wear out ›
» login or register to post comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Spawning Sphereworlds and Ringworlds

Submitted by marhawkman on Wed, 2008-05-07 01:14.

have you actually tested this? My attempts show that the game will spawn a planet of size tiny-huge instead. This behavior might have been changed in 1.71 though. The code for spawning planets treats an invalid entry as "any". Being constructed results in it being an invalid setting.

» login or register to post comments

Re: Spawning Sphereworlds and Ringworlds

Submitted by Corellon on Wed, 2008-05-07 11:22.

Yes I have tested it and it works, the Key thing is making sure sure that the Specific name is Sphereworld # (1-14), the size is Huge.... But the Most important thing is making sure that atmosphere and Composition match what is defined for that number in StellarObjectTypes.txt

#1 = Rock, None
#2 = Rock, Methane
#3 = Rock, Oxygen
etc, etc

If they don't match what is listed, for example having Sphereworld 1 with atmos, comp = any, or say Ice, Methane it's invalid and thus will be treated as a invalid entry.

The only thing different is I defined the ability as Normal Destoryed Star as I didn't want any special abilities to be spanwed on the planet (ruins, etc)

You also have to modify quadrant types to add the new systems into the list of generated systems.

I've tested this with 1.66 and briefly with 1.71

» login or register to post comments
Mod Designer

Re: Spawning Sphereworlds and Ringworlds

Submitted by battlespud on Wed, 2008-05-07 15:56.

this iwll prove useful to implement halos, How commonly do they spawn?

» login or register to post comments
Mod Designer

Re: Spawning Sphereworlds and Ringworlds

Submitted by Fyron on Wed, 2008-05-07 16:48.

Depends on how commonly you seed them in the quadrant types...


SpaceEmpires.net | Space Empires Wiki

» login or register to post comments
Shrike's picture
Mod Designer

Re: Spawning Sphereworlds and Ringworlds

Submitted by Shrike on Wed, 2008-05-07 17:04.

Would be fun for a multiplayer game. Just have everybody start around the borders of a map and drop one sphere world somewhere at a system in the middle of the map. The map would have to be a premade one though, with evenly spaced spawning points for all players and the sphere world, or the randomness of it would be causing riots among players Smiling

----------
See my PBW game stories on http://users.pandora.be/banzaiboy/sevpbw/.

» login or register to post comments

Re: Spawning Sphereworlds and Ringworlds

Submitted by Corellon on Thu, 2008-05-08 00:30.

Now in theory you could have it spawn 2,3,4 sphereworlds per map, but I haven't tested if the game will actually spawn warp points properly in the inbetween spaces, My idea is to modify it to support spawning of "artifical planets" something inbetween a ringworld and a huge world, basicly just the graphic of a sphereworld resize to occupy 1 or 2 sectors. For those that remember MOO there was the antras system (Probably spelled it wrong) that contained larger planets and better quality planets, or just to simulate a "Sol" system where what remains of the old earth civilization can be found (thinking earth would just be one giant metalic industral nation by the time it dies off)

Could also in theory insure that every starts in a system with a sphereworld by setting all other system types to cannot start, the only trick would be finding a way to match the type to the homeworld. I'm still experimenting to see if there is a better way then spawning 14 different systemtypes.

» login or register to post comments

Re: Spawning Sphereworlds and Ringworlds

Submitted by marhawkman on Thu, 2008-05-08 08:25.

You're thinking of Orion. and the word is spelled Antares. Sticking out tongue so this actually does work? Cool!

» login or register to post comments

Re: Spawning Sphereworlds and Ringworlds

Submitted by Corellon on Sat, 2008-05-10 20:44.

Little update, was wondering why it worked on my laptop but not the desktop, I didn't write down all the steps I did sorry.

In planetsizes.txt you still have to chance constructed = FALSE

and in order to get ring/sphere worlds from not poping up everywhere change:

Name := Huge
Physical Type := Planet
Stellar Size := Large (Huge in stock)
Max Population := 8000
Max Facility Space := 25000
Max Cargo Space := 32000
Max Supply Storage := 80000
Max Ordnance Storage := 80000
Domed Max Population := 2000
Domed Max Facility Space := 5000
Domed Max Cargo Space := 8000
Domed Max Supply Storage := 16000
Domed Max Ordnance Storage := 16000
Constructed := False
Special Ability ID := 0

Huge planets will still spawn, but at the rate of large planets (Large planets will spawn still too, but at a 50/50 split with huge (50% of "large" planets will be huge (more or less)), so in systemtypes change the spawn change of a large to 40% and huge to 0%

Now create a system that looks like this:

Name := SpherWorld
Description := Standard solar system with a Ring World.
System Physical Type := Normal
Portrait Bitmap := System_Normal1.bmp
Portrait Picture Index := 1
Empires Can Start In := FALSE
Number of Abilities := 0
WP Stellar Abil Type := Normal Warp Point
WP Min Radius := 360
WP Max Radius := 400
Chance Type Used := Standard
Number of System Objs := 1
Obj 1 Physical Type := Planet
Obj 1 Position := Ring 1
Obj 1 Stellar Abil Type := Normal Planet
Obj 1 Specific Stellar Obj Name := Any
Obj 1 Size := Huge
Obj 1 Atmosphere := Any
Obj 1 Composition := Any

Now a random sphere or ring world will be generated.

The only side effect is that the starting planets are huge instead of large (if you choose the option that would normally generate large ones) but that could be corrected by rearanging the order they appear in stellarobjecttypes.txt (didn't test but alwasy seems to choose the first match for a homeworld rather then a random match)

I've also tried a method using external events to remove the unwanted sphereworlds (if not using the above method) but it requires one turn to take effect before replacing them with random planets of a "normal" type

» login or register to post comments

Re: Spawning Sphereworlds and Ringworlds

Submitted by marhawkman on Sun, 2008-05-11 04:32.

Interesting... And this approach does not create random nuisances?

» login or register to post comments

Re: Spawning Sphereworlds and Ringworlds

Submitted by Corellon on Sun, 2008-05-11 22:12.

No it doesn't, It took me a while to figure a few things out:

Stellar size is appearantly hardcoded (Something I'd love to be changed, makes this much easier)

During system creation, the planets are created in (somewhat) this order:

Stellar Object type is choosen/set (Planet)
Position is created (if not set)
If Specific Obj Name = Any pick a random planet, otherwise use the specific obj.
Pick a planet size if not set.
Pick atmosp. if not set.
Pick Composition if not set.

At this point the game consults stellerobjecttypes.txt it will load up all the planets, and then pick a random one where the atmosphere and composition match the set/generate criteria, It will then look up the planettype entry (tiny,small,med,large,huge,ring,sphere) in planettypes.txt and match it against the listed Stellar size If it doesn't match it will go back and pick another till it finds one or there are no possibilities (The inner workings are probably a bit different, but it gives the point across).

By changing planet type Huge to a Large stellar size, it keeps huge planets, but makes them a large stellar body instead, thus will spawn at the rate of large planets (it's rather 50/50 since there is a change it will spawn a large planet instead) and ring and sphereworlds will be the only ones to spawn if stellar size = huge...

By changing the random spawn chance from 20% to 0% for huge you eliminate the possibility of it being randomly spawned, and after editing any system types that might implicically create a huge planet (such as a custom system) and changing those from huge to large you eliminate all chances of a huge stellar body being created.

I found tiny = 20%, small = 20%, medium = 20% and large = 40% to generate the same mixture as having large = 20% and huge = 20% in stock.

It would be great if at least one more stellar type could be added, perhaps artificial which would eliminate all this hassle, but till then have to make do I suppose. It's not without it's quirks, as I said in the games and tests I've started the homeworlds are now huge instead of large requiring a bit more work if you want to elimate that (which I haven't tried as it's not a issue to me, just a quirk) or you could go the route of eliminating tiny planets and moving all others down the stellar scale by one, or instead merging tiny and small into the tiny stellar size rather then large/huge (huge would become large, large medium and medium small)

It's also possible to create more planet types in the planettypes file so long as you obay the same stellar sizes, could make ringed planets a new type with a facility/cargo size half way between the normal size and the next size.

I've also experimented with (and got working) a script that generates planet values based on the "useless" data.....

Organic value = conditions (Stems to reason any form of organics of a civilization would require the same conditions as the populus)
Radioactive value = Rad value of the planet/stars
Mineral Value = Gravity of the planet.

Adds a bit more use to those "flavor texts" so longs as the values are properly randomized.

» login or register to post comments

Re: Spawning Sphereworlds and Ringworlds

Submitted by marhawkman on Mon, 2008-05-12 01:47.

Interesting, I wonder why he hardcoded it to only do 5 sizes? In theory, stuff like ringworld should be a valid size. It doesn't make sense for it to only use those five values regardless of how many actually exist.

I must say though, I think you might have saved me several hours of work on my next mod project. I'm gonna be doing some insanely complex modding as is and this will make it somewhat less time consuming.

» login or register to post comments

Re: Spawning Sphereworlds and Ringworlds

Submitted by Corellon on Mon, 2008-05-12 04:20.

Well as far as I can see even SE4 had the size hard-coded to tiny,medium,small,large and huge......

I have no idea why, Just that the stellar size must be used for something internal.... the game and scripts use the planet size (where ring and sphere are thier own size, and you could make your own sizes (extra tiny perhaps?) but stellar size I have no idea of it's function other then when generating planets... It's something internal, and in the maintext there are sector text tags for tiny,small,medium,large and huge (but none for sphere or ring)

Just something internal.

Also another idea I've played with is this (tested and it does work)

Name := Unified Shield Generator
Description := Generator which creates an energy field that cannot be penetrated by phased weapons.
Picture Number := 18
Maximum Level := 100
Tonnage Space Taken Formula := 30
Tonnage Structure Formula := 30 + (([%Level%] - 1) * 10)
Cost Minerals Formula := 400 + (([%Level%] - 1) * 4)
Cost Organics Formula := 0
Cost Radioactives Formula := 100 + (([%Level%] - 1) * 1)
Supply Amount Used Formula := 0
Ordnance Amount Used Formula := 0
Can Be Placed On Vehicle Types := Ship, Base, Satellite, Weapon Platform, Drone
Can Be Placed In Ship Sections := Inner Hull, Outer Hull
Component Type List := Technological
General Group := Shields
Custom Group := 0
Number Of Requirements := 2
Requirements Evaluation Availability := AND
Requirements Evaluation Allows Placement := TRUE
Requirements Evaluation Allows Usage := TRUE
Requirement 1 Description := Empire must have at least tech level 1 in Shields.
Requirement 1 Formula := Get_Empire_Tech_Level("Shields") >= (1 + ([%Level%] - 1))
Requirement 2 Description := Empire must have at least tech level 1 in Phased - Energy Weapons.
Requirement 2 Formula := Get_Empire_Tech_Level("Phased - Energy Weapons") >= 1
Number Of Abilities := 2
Ability 1 Type := Shield Generation
Ability 1 Description := Generates [%Amount2%] phased shield points.
Ability 1 Scope := Space Object
Ability 1 Range Formula := 0
Ability 1 Amount 1 Formula := "Phased Shields"
Ability 1 Amount 2 Formula := 100 + (([%Level%] - 1) * (30 * Min(1,( Get_Empire_Tech_Level("Phased - Energy Weapons") / [%Level%]))))
Ability 2 Type := Shield Generation
Ability 2 Description := Generates [%Amount2%] shield points.
Ability 2 Scope := Space Object
Ability 2 Range Formula := 0
Ability 2 Amount 1 Formula := "Normal Shields"
Ability 2 Amount 2 Formula := (100 + (([%Level%] - 1) * (30 / 1))) - (100 + (([%Level%] - 1) * (30 * Min(1,( Get_Empire_Tech_Level("Phased - Energy Weapons") / [%Level%])))))
Weapon Type := None

Unified shields are same size and shield value as normal shields (makes the AI better as it always just upgrades to the best even when phased shields only give 170 points). The catch is that the ammount of phased shields is based on your phased weapons technology to shield technology ratio.... If you have lvl 100 shields and level 1 phased weapons you only get 1/100th of the points as phased points, the rest are given as normal shield points) if you have more phased wpeaon levels then shield levels the value is capped to that of your max shields

I've also done some work modifying organic armor so that the regen rate is based off of organic tech, but the armor value is based off of armor tech, reduced it's size to match normal armor (of course balancing the armor value and regen rate for the smaller size) again to make the AI a bit more competitive (Since the Ai doesnt' like using smaller pieces of armor unless it's coded to go through a list))

» login or register to post comments

Re: Spawning Sphereworlds and Ringworlds

Submitted by marhawkman on Mon, 2008-05-12 09:00.

Hm... that thing you mentioned about EVERYTHING having those same sizes got me thinking... Maybe this is a universal function that is true for all types of stellar objects. Even Warp Points have the same range of sizes available to them, even though the game only uses small and large.

Organic Armor would best be balanced with the same values as in stock, except component size. Reduce that to 10 and it should be good. It's insanely overcosted at 30.

the shield idea is neat, not sure if I'll ever use it. Maybe ask Kwok about adding those to Balancemod?

» login or register to post comments
Mod Designer

Re: Spawning Sphereworlds and Ringworlds

Submitted by battlespud on Mon, 2008-05-12 15:24.

IRONY i was thinking about a shield like that today but im not goood at stuff like that so i was thinking and here it is!

» login or register to post comments

Re: Spawning Sphereworlds and Ringworlds

Submitted by marhawkman on Sat, 2008-05-17 01:33.

Um... I tried this and couldn't get it to work. Any idea what I might be doing wrong?

It actually looks to me like the game might ignore the settings for size distribution.

» login or register to post comments

Re: Spawning Sphereworlds and Ringworlds

Submitted by Corellon on Sat, 2008-05-17 15:18.

Planetsize.txt

Name := Huge Physical Type := Planet Stellar Size := Large Max Population := 8000 Max Facility Space := 25000 Max Cargo Space := 32000 Max Supply Storage := 80000 Max Ordnance Storage := 80000 Domed Max Population := 2000 Domed Max Facility Space := 5000 Domed Max Cargo Space := 8000 Domed Max Supply Storage := 16000 Domed Max Ordnance Storage := 16000 Constructed := False Special Ability ID := 0

Name := Ringworld
Physical Type := Planet
Stellar Size := Huge
Max Population := 32000
Max Facility Space := 100000
Max Cargo Space := 128000
Max Supply Storage := 320000
Max Ordnance Storage := 320000
Domed Max Population := 8000
Domed Max Facility Space := 20000
Domed Max Cargo Space := 32000
Domed Max Supply Storage := 80000
Domed Max Ordnance Storage := 80000
Constructed := False
Special Ability ID := 1

Name := Sphereworld
Physical Type := Planet
Stellar Size := Huge
Max Population := 64000
Max Facility Space := 200000
Max Cargo Space := 256000
Max Supply Storage := 640000
Max Ordnance Storage := 640000
Domed Max Population := 16000
Domed Max Facility Space := 40000
Domed Max Cargo Space := 64000
Domed Max Supply Storage := 160000
Domed Max Ordnance Storage := 160000
Constructed := False
Special Ability ID := 2

SystemTypes.txt

Number of Any Chance Types := 1
Chance Type 1 Name := Standard
Chance Type 1 Number of Any Planet Sizes := 5
Chance Type 1 Any Size 1 Type := Tiny
Chance Type 1 Any Size 1 Chance := 20
Chance Type 1 Any Size 2 Type := Small
Chance Type 1 Any Size 2 Chance := 20
Chance Type 1 Any Size 3 Type := Medium
Chance Type 1 Any Size 3 Chance := 20
Chance Type 1 Any Size 4 Type := Large
Chance Type 1 Any Size 4 Chance := 40
Chance Type 1 Any Size 5 Type := Huge
Chance Type 1 Any Size 5 Chance := 0
Chance Type 1 Number of Any Planet Atmospheres := 5
Chance Type 1 Any Atmos 1 Type := None
Chance Type 1 Any Atmos 1 Chance := 20
Chance Type 1 Any Atmos 2 Type := Methane
Chance Type 1 Any Atmos 2 Chance := 20
Chance Type 1 Any Atmos 3 Type := Oxygen
Chance Type 1 Any Atmos 3 Chance := 20
Chance Type 1 Any Atmos 4 Type := Hydrogen
Chance Type 1 Any Atmos 4 Chance := 20
Chance Type 1 Any Atmos 5 Type := Carbon Dioxide
Chance Type 1 Any Atmos 5 Chance := 20
Chance Type 1 Number of Any Planet Compositions := 3
Chance Type 1 Any Comp 1 Type := Rock
Chance Type 1 Any Comp 1 Chance := 34
Chance Type 1 Any Comp 2 Type := Ice
Chance Type 1 Any Comp 2 Chance := 33
Chance Type 1 Any Comp 3 Type := Gas Giant
Chance Type 1 Any Comp 3 Chance := 33
Stellar Background Images Min Per System := 2
Stellar Background Images Max Per System := 5
Number of Stellar Background Images := 29
(Plus background stuff I didnt' copy over to save space)

Name := SpherWorld 1
Description := Standard solar system with a Ring or Sphere World.
System Physical Type := Normal
Portrait Bitmap := System_Normal1.bmp
Portrait Picture Index := 1
Empires Can Start In := FALSE
Number of Abilities := 0
WP Stellar Abil Type := Normal Warp Point
WP Min Radius := 360
WP Max Radius := 400
Chance Type Used := Standard
Number of System Objs := 1
Obj 1 Physical Type := Planet
Obj 1 Position := Ring 1
Obj 1 Stellar Abil Type := Normal Destroyed Star
Obj 1 Specific Stellar Obj Name := Any
Obj 1 Size := Huge
Obj 1 Atmosphere := Any
Obj 1 Composition := Any


Just before you add that line in, do a replace where (Size := Huge) becomes (Size := Large)

You do have to set constructed := false for the ring and sphereworlds though.

Also came across a interesting bug/feature? In my datafiles (I didn't change that part of them) there is no blocking on ring worlds, so it's possible for objects to spawn in the centre of them, like a warp hole.... it also makes the computer want to run a ship through it rather then around it.

» login or register to post comments

Re: Spawning Sphereworlds and Ringworlds

Submitted by marhawkman on Sat, 2008-05-17 16:19.

When I tried it the game seemed to ignore the settings for the spawn rates of large and huge.

» login or register to post comments

Re: Spawning Sphereworlds and Ringworlds

Submitted by Corellon on Sat, 2008-05-17 18:12.

what do you mean ignored it? it's spawning sphereworlds in systems? or it doesn't spawn sphere worlds?

If it's spawning sphereworlds in systems with planets then there could be two causes, one is that you didn't change the spawn chance for huge worlds to 0, the other being that some systems by default specify huge worlds, go through the systems and some might have Obj # Size := Huge specified rather then [Any]

If it's not spawning sphereworlds it's because you have to specify a specific system like I made (spherworld 1) and add that to the quadranttypes.txt file with a chance to spawn that system type

» login or register to post comments

Re: Spawning Sphereworlds and Ringworlds

Submitted by marhawkman on Sun, 2008-05-18 00:33.

"it's spawning sphereworlds in systems?"

Yes.

"If it's spawning sphereworlds in systems with planets then there could be two causes, one is that you didn't change the spawn chance for huge worlds to 0,"

did that.

"the other being that some systems by default specify huge worlds, go through the systems and some might have Obj # Size := Huge specified rather then [Any]"

I'll have to double check that.

"If it's not spawning sphereworlds it's because you have to specify a specific system like I made (spherworld 1) and add that to the quadranttypes.txt file with a chance to spawn that system type"

did that.

I'll try double checking to make sure.

» login or register to post comments

Re: Spawning Sphereworlds and Ringworlds

Submitted by marhawkman on Sun, 2008-05-18 11:53.

Okay I figured out what I did wrong. 3 things! 2 completely unrelated to the thread. Sticking out tongue I was trying to work this in to a mod preject rather than doing this in stock. This project: http://home.spaceempires.net/ftopict-4497.html

1: I forgot to look for systems that were already set to spawn HUGE planets. (fixed)

2: In making my mod I accidentally overwrote the data entry for ringworld graphics. (fixed)

3: creating a game with a 1:1 correlation between atmospheres and physical types does weird crap to the game. It will occasionally NOT spawn planets at all. Sad IE it seems to randomly pick combinations over and over. If it doesn't get a good one with X tries it gives up and doesn't spawn that object. Avoiding "Any" in atmosphere and Physical type seems to fix this.

4: #3 also makes for really long map generation. I'm gonna have to reset all references to "any", except size.

» login or register to post comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Now on STEAM

Now on STEAM!Space Empires V via STEAMSpace Empires IV via STEAMSTEAM online by Valve Corporation

Popular content

Today's:

  • Star Wars SEV ship set available
  • No Point Defence in Technology in Balance mod
  • Research By Percentage SUCKS
  • New Engine System
  • Space Empires V 1.74

All time:

  • Space Empires V and VI: Expansions and the Future: Tell the Company What's on Your Wish List
  • Space Empires V
  • Gritty Galaxy Fleet Clash
  • Damn Dirty Bugs/Annoyances
  • Space Empires V: General Thoughts, Observations, and Suggestions

Last viewed:

  • Balance Mod 1.12 - orange stars for warp points, nebulae etc
  • Need help with minor modding
  • "Could not load combat replay"
  • Unit idea - perhaps for Cpt Kwok or other AI modder could look at and comment
  • You're gonna like this one
(c) Strategy First, Inc. All rights reserved.