This site is in archival mode. A replacement is being developed. In the meantime, please use the PBW2 Forums for community discussions. The replacement software for this site will use a unified account system with PBW2, and any newly created threads will carry over.
Welcome to Spaceempires.net
Login or Register

Search
Modules
· Content
· Downloads
· Forums
· Game Info
· Image Gallery
· Links
· Shipyards
· Topics
· Staff

User Info
· Welcome, Anonymous
Membership:
· New: Astorre
· New Today: 0
· New Yesterday: 0
· Overall: 3155

People Online:
· Visitors: 96
· Members: 0
· Total: 96

  

Spaceempires.net :: Create Planets :: View topic
Forum FAQ :: Search :: Memberlist :: Usergroups :: Profile :: Log in to check your private messages :: Log in


Create Planets

 
Post new topic   Reply to topic    Spaceempires.net Forum Index -> SEV Modding Discussion
View previous topic :: View next topic  
Author Message
Merthen
Space Emperor


Joined: Jun 25, 2009

PostPosted: Wed Mar 05, 2014 9:45 pm    Post subject: Create Planets Reply with quote

Hi all

I have a problem. To finish script to create planets (alternative) I have to find a way to check the size of the asteroid field and remove it.
Does anybody have an idea?

Regards


Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Thu Mar 06, 2014 5:44 am    Post subject: Reply with quote

I haven't done any event scripts, so I don't know what constraints you're working under.

"SPACE_OBJECT_TYPE_ASTEROIDS = 8"

I wouldn't expect there'd be a need to know the size, but rather the "space object id" number.

I notice there is no "SYS_DESTROY_ASTEROIDS", so you have your work cut out for you.

There's not a lot of thought behind this, but might you convert the asteroid field to a storm, and then just destroy the storm? Oops - maybe not. I don't see anything that lets you set the type of a space object. I must stop taking for granted that anything which one can get, one can set. That's habit from other languages.


Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Thu Mar 06, 2014 6:02 am    Post subject: Reply with quote

Say...

If you've got a way to destroy asteroids... how many sizes are there? Can't you just make a loop and destroy all potential sizes one-by-one? I suppose a wrong entry might bomb, but lots of functions just "return false" if they fail.


Back to top
Merthen
Space Emperor


Joined: Jun 25, 2009

PostPosted: Thu Mar 06, 2014 3:43 pm    Post subject: Reply with quote

I am looking for two functions Smile
1 check the size of asteroids
2 destroy asteroids


Back to top
marhawkman
Space Emperor


Joined: Mar 24, 2008

PostPosted: Thu Mar 06, 2014 6:59 pm    Post subject: Reply with quote

Ooh... an Honor Harrington fan, cool!

Hmm... this is a sophisticated scripting function. I remember Isopsyco did something like it for his version of Asteroid mod.


Back to top
Merthen
Space Emperor


Joined: Jun 25, 2009

PostPosted: Fri Mar 07, 2014 6:24 pm    Post subject: Reply with quote

HH loyal fan Smile

I checked - Asteroid Habs Ver2.
Unfortunately, asteroid fields are not removed it Sad


Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Sat Mar 08, 2014 7:34 pm    Post subject: Reply with quote

It won't be easy.

http://www.spaceempires.net/modules.php?name=Forums&file=viewtopic&p=64960

We have a grab bag assortment, when it comes to tools. There'll be something that looks easy, and then you don't have what you need.

Myself, if I just had to do what you're attempting? It'd be a whale of a project, but I'd make a "ghost" empire, and give it its own AI. It'd be limited (at least in what it KNOWS) to one or two hulls, and no weapons, armor, or shields. All its stuff'd be cloaked to ridiculous levels. It'd build some shipyard ships and rely on event scripts for resources. Once it had its shipyard ships constructed, it'd abandon all its colonies and disappear.

The only problem left would be the odd chance collisions, when ghost ships are encountered by accident. That's unavoidable, but giving them a non-shooting point blank strat (suicidal) should suffice to make them sufficiently non-factors.

THEN a ghost ship could go convert some asteroids to planets, using the same "ability" players presently use.

Hopefully, you'll think of something better. Modders often have to be creative and work around obstacles.


Back to top
marhawkman
Space Emperor


Joined: Mar 24, 2008

PostPosted: Tue Mar 11, 2014 3:18 am    Post subject: Reply with quote

Merthen wrote:
HH loyal fan Smile

I checked - Asteroid Habs Ver2.
Unfortunately, asteroid fields are not removed it Sad
Err... I was really saying you should ask Iso how to do it... if you can find him.

Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Thu Mar 13, 2014 10:48 pm    Post subject: Reply with quote

Okay, I came up with another idea. What if you give the asteroids themselves the same ability ships use to create planets from asteroids? Your script could then issue orders to the asteroid to use the ability when the event is triggered. The main issue would be whether or not the asteroid would then execute its orders.


It might be worth a try, if you have nothing better. There is an event script which alters the orders of ships, so I don't think issuing the order would be a problem.

Anyhow, it should only involve modifying StellarAbilityTypes.txt and writing your script. It wouldn't be trivial, but I don't think it'd take forever.


Back to top
marhawkman
Space Emperor


Joined: Mar 24, 2008

PostPosted: Sun Mar 16, 2014 12:11 am    Post subject: Reply with quote

Umm... it's disclaimer time... I don't know enough about scripting to do this, but this is what I understand from what Isopsyco said:

The script he wrote for his version of Asteroids mod check to see if a ship with the conversion component is at the same location as an asteroid belt, then it creates a new object at the location that is colonizable.

I'm... guessing... based on how you can add/remove storms with scripts, (It was done in the BSG mod.) that you could modify the script Isopsyco wrote to delete an asteroid belt after it makes the new object. But I'm not sure since I've never tinkered with that aspect of SE5 modding.


Back to top
Skyburn
Space Emperor


Joined: Mar 12, 2008

PostPosted: Mon Mar 17, 2014 5:10 pm    Post subject: Reply with quote

I don't think there are script functions to remove asteroids. I think in most asteroid habitat mods the asteroids are technically planets. I haven't actually tested this, so there's still room for doubt. It's possible that the asteroid removal script function was added in a patch and not properly documented.

Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Mon Mar 17, 2014 11:20 pm    Post subject: Reply with quote

Actually... "Sys_Destroy_Planet" might do the trick. Every space object has an ID. Unless the function runs some sort of check to be sure it's a planet, and not something else, it just might delete the fool thing.

Quirks notwithstanding, there's almost got to be some way to monkey with any space object in the game. It could take a lot of trial-and-error to work out, of course. Abusing some of the tools at hand is probably the quickest and most direct approach.

I don't know...


Back to top
marhawkman
Space Emperor


Joined: Mar 24, 2008

PostPosted: Mon Mar 31, 2014 2:08 pm    Post subject: Reply with quote

Skyburn wrote:
I don't think there are script functions to remove asteroids. I think in most asteroid habitat mods the asteroids are technically planets. I haven't actually tested this, so there's still room for doubt. It's possible that the asteroid removal script function was added in a patch and not properly documented.
I know this... I wrote one of them...

In SE5, Asteroids are a different type of stellar object than planets, and thus not colonizable. So to be able to colonize an object that looks like asteroids, you need to make a planet that uses an Asteroid model.


Back to top
Skyburn
Space Emperor


Joined: Mar 12, 2008

PostPosted: Mon Mar 31, 2014 3:19 pm    Post subject: Reply with quote

marhawkman wrote:
Skyburn wrote:
I don't think there are script functions to remove asteroids. I think in most asteroid habitat mods the asteroids are technically planets. I haven't actually tested this, so there's still room for doubt. It's possible that the asteroid removal script function was added in a patch and not properly documented.
I know this... I wrote one of them...

I forgot that, sorry. Embarassed


Back to top
Display posts from previous:   
Post new topic   Reply to topic    Spaceempires.net Forum Index -> SEV Modding Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
All logos and trademarks used on this site, all comments and stories posted for reading, all files hosted for download,
and all art work hosted for viewing are property of their respective owners; all the rest copyright 2003-2010 Nolan Kelly.
Syndicate news: SpaceEmpires.net News RSS Feed - Syndicate forums: SpaceEmpires.net Forums RSS Feed
Page Generation: 0.18 Seconds