### Author Topic: My First Map- Trouble already!  (Read 5210 times)

0 Members and 1 Guest are viewing this topic.

#### Lost Seedling

• Shrub
• Thank You
• -Given: 3
• -Receive: 3
• Posts: 148
##### Re: My First Map- Trouble already!
« Reply #30 on: July 13, 2011, 01:03:05 AM »
Thanks all for your answers and Annik's views on good map qualitiies. The XML file answered some of my questions.

I still can't understand the (relative) lack of user-made maps available- considering how long this game has been out. Maybe when it gains a wider audience more people will be interested.

Annik, if you ever actually get around to creating/re-writing your guide for complete beginners, I've got a lot of suggestions for you! My first suggestion would be to make a downloadable PDF or Microsoft Word document or something that would be easily printed or searchable for key words. I've been pasting every map code I can find into Word and typing up my own Excel sortable tables of commands, etc. so that I can easily find actual examples of what I'm looking for. It has taken a lot of time but there is nothing like looking at actual examples of things in use. Maybe some day I'll be knowledgable enough to make my own.

Anyway, here's a question for anyone--

I'm trying to find out how many asteroids an Empire owns. I don't want to know it's relation to another number- I want the actual number.

I typed "ownast =  GetEmpire(2):GetNumOwnedAsteroids()". It doesn't matter which empire I include.

But it's not returning anything other than what I declared ownast to be in the setup level. I know I could work around it through a process of elimination, but how can I just get the answer in one line?

#### Lost Seedling

• Shrub
• Thank You
• -Given: 3
• -Receive: 3
• Posts: 148
##### Re: My First Map- Trouble already!
« Reply #31 on: July 13, 2011, 08:39:35 AM »
Now I have another problem. I'm trying to allow the game to randomly  choose number of empires, but it puts these empires randomly on the map, regardless of who "owns" the asteroid in setup. I want to control which asteroids the empires spawn on. As a solution, I figured I would just remove the seedlings from those asteroids and then put the number I want on the asteroids I've already assigned as the owner. It isn't working and I can't figure out why.

As a test- I already added 200 seedlings to asteroid 5, owned by Empire 2. Now, I want to remove some of them. I type:

if GetAsteroid(5):GetNumSeedlings(2) > 0 then
GetAsteroid(5):RemoveSeedlings(2,100)
end

At this point the game crashes and I'm never able to find an error code.

Is the format incorrect? If not, what else could be the problem? As soon as I remove the offending lines of code it runs perfectly.

#### annikk.exe

• Achiever
• Ent
• Thank You
• -Given: 0
• -Receive: 0
• Posts: 1,794
##### Re: My First Map- Trouble already!
« Reply #32 on: July 13, 2011, 10:05:36 AM »
Code: [Select]
`ownast = GetEmpire(2):GetNumOwnedAsteroids()`
This is correct.  If the value of "ownast" is not being set correctly, there are two possibilities why.  The first is that you are checking the wrong empire number.  The second is that this code is never being run.  Try adding a "MessageBox("Fish")" just below that line, and then run the map.  Do you get a fish?  If not, it's because this code is never being run!

With regard to removing seedlings, the command is bugged.  It's suggested to avoid using it until A&R get a chance to fix it.  :>

#### Lost Seedling

• Shrub
• Thank You
• -Given: 3
• -Receive: 3
• Posts: 148
##### Re: My First Map- Trouble already!
« Reply #33 on: July 14, 2011, 07:23:28 AM »
Well, you're right! It wasn't running, but everything else around it was running. I moved it up a few lines and it ran fine. Don't know why. I'm getting very good at tracing errors, now. HA!

As for the RemoveSeedlings command, I saw you using it in Extreme PWN LAZORZ!!12 and thought I could get away with it, too! Foolish NOOB!!

#### annikk.exe

• Achiever
• Ent
• Thank You
• -Given: 0
• -Receive: 0
• Posts: 1,794
##### Re: My First Map- Trouble already!
« Reply #34 on: July 14, 2011, 08:10:14 AM »
Hmm, I did use it there..

Seems like I did it this way:

(run as part of a continuous loop)
Code: [Select]
` if GetAsteroid(69):GetNumSeedlings(0) > 0 then GetAsteroid(69):RemoveSeedlings(0,1) end`

#### Lost Seedling

• Shrub
• Thank You
• -Given: 3
• -Receive: 3
• Posts: 148
##### Re: My First Map
« Reply #35 on: July 31, 2011, 07:36:38 AM »
Wanted: A few volunteers with time to play with my first map and make suggestions to get it ready for prime time. Each game lasts between 5 and 10 minutes (usually even less), and you'll randomly compete against 1 to 3 factions. Since I'm the only playtester I can't tell if it is too hard, too easy, fun, or boring. Any feedback at all would be most helpful.

#### zn00p

• Seed
• Thank You
• -Given: 0
• -Receive: 0
• Posts: 5
##### Re: My First Map- Trouble already!
« Reply #36 on: July 31, 2011, 08:59:25 AM »
i'd like to betatest ...

#### Lost Seedling

• Shrub
• Thank You
• -Given: 3
• -Receive: 3
• Posts: 148
##### Re: My First Map- Trouble already!
« Reply #37 on: July 31, 2011, 11:56:48 AM »
Great! I sent you a PM.

#### Aino

• Ent
• Thank You
• -Given: 1
• -Receive: 20
• Posts: 1,483
• They'll eat you next!
• Eufloria: Yes
##### Re: My First Map- Trouble already!
« Reply #38 on: July 31, 2011, 11:57:27 AM »
Add me too, now I got two maps to beta test, but I dun' care

#### Aino

• Ent
• Thank You
• -Given: 1
• -Receive: 20
• Posts: 1,483
• They'll eat you next!
• Eufloria: Yes
##### Re: My First Map- Trouble already!
« Reply #39 on: July 31, 2011, 08:36:17 PM »
I admire people making their first/second/third map :S

Why? They got the creativity I lack of. I'm doing more structured and pre-done things...

#### Lost Seedling

• Shrub
• Thank You
• -Given: 3
• -Receive: 3
• Posts: 148
##### Re: My First Map- Trouble already!
« Reply #40 on: August 16, 2011, 10:13:44 PM »
Has anyone else encountered this problem or know of a solution?

On a map I'm working on, one asteroid refuses to allow seedlings to be sent to another asteroid that is well within sending range. SeedlingCap is not an issue and it will send to other asteroids. Other asteroids will send to this asteroid, but for some reason these two asteroids will not work together. When I drag the mouse over to it, the arrow disappears but the "number of seedlings" is still there. When I release the mouse button, the number flashes as if it accepted the transfer, but nothing ever happens. There is another pair of asteroids on the other side of the map with the same condition, but with no other similarities. I'm assuming the problem lies with the sending part and not the receiving part, but of course it could be anything.  Anyone else ever experienced this? Any ideas?

I'm thinking a solution will be to just put another, third, asteroid in the mix, but that is messy and doesn't answer the underlying question.

#### Lost Seedling

• Shrub
• Thank You
• -Given: 3
• -Receive: 3
• Posts: 148
##### Re: My First Map- Trouble already!
« Reply #41 on: August 16, 2011, 11:58:30 PM »
I broke it! I tried adding another asteroid (number 31) and now I keep getting an error message that the system is "out of memory". So the third asteroid is not an option. Well, if I'm running that close to the memory limit of Eufloria at least now I know what I can and can't do. The game is running fine, otherwise, but I guess I just put too many goodies in the map. Could that be the cause of the sending problem? If so, why does it only affect those 2 pairs of asteroids?

#### Aino

• Ent
• Thank You
• -Given: 1
• -Receive: 20
• Posts: 1,483
• They'll eat you next!
• Eufloria: Yes
##### Re: My First Map- Trouble already!
« Reply #42 on: August 17, 2011, 05:13:08 AM »
Well, did you set the aster SendDistances in levellogic? 'cause it might do that asteroids that weren't in range will not be able to be sent to. I guess you prevent this by setting the senddistance REALLY BIG in LevelSetup and ur good to go. If thats not the problem, we'll have to work on it...

#### Lost Seedling

• Shrub
• Thank You
• -Given: 3
• -Receive: 3
• Posts: 148
##### Re: My First Map- Trouble already!
« Reply #43 on: August 17, 2011, 06:45:03 AM »
Yes, the send distances were set in Level Logic. I really think it has something to do with reaching the memory limit imposed by Eufloria. This map uses a LOT of memory as noted, and I'm not sure I can reduce it and still have the features I want so I'll just have to live with it. I added the MIA and it was a very enjoyable game so it's not going to be a show-stopper if I can't get those asteroids to work with one another.

Just out of curiosity I'm going to disable the memory-hogging functions and see if that makes a difference...I'll let you know the result.

I sure wish I was a coding genius like you or Annikk or Hitman or all you other guys so I could make super-efficient algorithms!

#### annikk.exe

• Achiever
• Ent
• Thank You
• -Given: 0
• -Receive: 0
• Posts: 1,794
##### Re: My First Map- Trouble already!
« Reply #44 on: August 17, 2011, 07:58:42 AM »
The amount of memory the game uses is determined by the size of send distances of all asteroids at the end of LevelSetup, after the game has made any automatic send distance adjustments so that all asteroids are reachable by others.

For a non-accurate example that should hopefully give you an idea of how it works..

If the furthest any asteroid can reach is X = 5000, Y = 5000 then the game might use 200 megs.
If it's X = 6000, Y = 6000, or X = 10000, Y = 10000, the game might use 400 megs (ie it doubles in size)
If it's X = 15000, Y = 15000, the game might use 800 megs.

And so on.

One trick to try to reduce the amount of memory the game uses, is to ensure your asteroids are overall centered around the origin (x = 0, y = 0).