Login  Register
 



Post new topicReply to topic
 
Author Message
 PostPosted: 17 Mar, 2011 
 

Joined: 17 Mar, 2011
Posts: 33
Offline
I recently tried the official map editor and as I got used to the tools I now want to go serious on a map. I want to create a map that's 1024 wide and 256 high. I first tried these settings in the 'new map' settings, but that just crashes my game while it's loading up. I asked around in the GPG chat and they said I should start of with a square map and use areas to black out the parts I don't want. However, there isn't a single tutorial on that subject for as far as I know. :?

So here's the burning question that's been killing me all this time: How would I go from a 1024x1024 map to a 1024x256 map? :shock:


I already tried creating an AREA_1 [0.0, 384.0, 1024.0, 640.0] and with this script in my map's folder:
trench warfare v0.1_script.lua
Quote:
local ScenarioUtils = import('/lua/ScenarioUtilities.lua');
local ScenarioFramework = import('/lua/modules/ScenarioFramework.lua');

function OnPopulate()
ScenarioUtils.InitializeArmies();
ScenarioFramework.SetPlayableArea('AREA_1', false);
end

function OnStart(self)
end


Top
 Profile  
 PostPosted: 18 Mar, 2011 
 
User avatar

Joined: 11 Sep, 2008
Posts: 243
Location: Noord Brabant, The Netherlands
Offline
In my _save.lua file I have the following code for the area

Code:
    Areas = {
        ['AREA_1'] = {
            ['rectangle'] = RECTANGLE( 0, 128, 512, 384 ),
        },
    },


My guess is that you need to leave all .0 behind your numbers away.

You can also download ForestPlanet FA V2b from The Vault or here if above will not work. Then you can do some research on how it's coded in a map where the Area is working.

_________________
Maps: WinterPlanet FA - ForestPlanet FA
Image


Top
 Profile  
 PostPosted: 18 Mar, 2011 
 

Joined: 17 Mar, 2011
Posts: 33
Offline
Thanks for the reply, I just took a look at the mentioned map and at first it looks like we got quite the same setup. I'll take a more indepth look at it right now. :)

Btw, after I created an area, there wasn't any code like that in my _save.lua . I added it manually later on but that didn't work.


Top
 Profile  
 PostPosted: 18 Mar, 2011 
 

Joined: 17 Mar, 2011
Posts: 33
Offline
Ok this is weird. I setup a map with 2 starting points and basically made it playable. Just going skirmish didn't give any problems (had a 2 hour battle vs Supreme AI on a 20x20 flat map :roll:).

I then went back in the editor, and created a new area (making sure no markers were outside of it). If I open up my _save.lua I can see it added the area:
Quote:
Areas = {
['AREA_1'] = {
['rectangle'] = RECTANGLE( 0.5, 0.5, 300.5, 400.5 ),
},
},


I then created a _script.lua with some code copied from a tutorial:
Quote:
local ScenarioUtils = import('/lua/ScenarioUtilities.lua');
local ScenarioFramework = import('/lua/modules/ScenarioFramework.lua');

function OnPopulate()
ScenarioUtils.InitializeArmies();
ScenarioFramework.SetPlayableArea('AREA_1', false);
end

I try to start it up and get the "You are defeated" message. :(


Top
 Profile  
 PostPosted: 18 Mar, 2011 
 
User avatar

Joined: 11 Sep, 2008
Posts: 243
Location: Noord Brabant, The Netherlands
Offline
QuakeFX wrote:
I try to start it up and get the "You are defeated" message. :(


try this code for the script.lua file, you are using an old version ;)

Code:
local ScenarioUtils = import('/lua/sim/ScenarioUtilities.lua')
local ScenarioFramework = import('/lua/ScenarioFramework.lua')

local oldOnPopulate = OnPopulate
function OnPopulate()
    oldOnPopulate()
    ScenarioUtils.InitializeArmies()
   ScenarioFramework.SetPlayableArea('AREA_1' , false)
end

local oldOnStart = OnStart
function OnStart(self)
    oldOnStart(self)
end


Make sure in your Scenario.lua it says ARMY and not Army. This will give you the Defeated message if I'm correct

Code:
version = 3
ScenarioInfo = {
  Configurations={
    standard={
      customprops={ },
      teams={
        { armies={ "ARMY_1", "ARMY_2", "ARMY_3", "ARMY_4" }, name="FFA" }
      }
    }
  },
  description="FINAL VERSION - The evacuation of the UEF Prime Worlds did not go smoothly. Thousands of civilians were forced into refugee camps that could barely sustain them, like the one on Mersela. The inhabitants of this camp were barely surviving the harsh weather and brutal rationing when an Order scout found them. Now, the Coalition and the Order are dueling over their fate. --- Map by Paceydre",
  map="/maps/ForestPlanet FA V2b.v0001/ForestPlanet FA V2b.scmap",
  map_version=1,
  name="ForestPlanet FA V2b",
  norushoffsetX_ARMY_1=0,
  norushoffsetX_ARMY_2=0,
  norushoffsetX_ARMY_3=0,
  norushoffsetX_ARMY_4=0,
  norushoffsetY_ARMY_1=0,
  norushoffsetY_ARMY_2=0,
  norushoffsetY_ARMY_3=0,
  norushoffsetY_ARMY_4=0,
  norushradius=65,
  preview="/maps/ForestPlanet FA V2b.v0001/FPFAV2B-Preview.jpg",
  save="/maps/ForestPlanet FA V2b.v0001/ForestPlanet FA V2b_save.lua",
  script="/maps/ForestPlanet FA V2b.v0001/ForestPlanet FA V2b_script.lua",
  size={ 512, 512 },
  starts=true,
  type="skirmish"
}


I hope this will get you a little bit further. Next time when you would like to quote your code, just use the Code tags

_________________
Maps: WinterPlanet FA - ForestPlanet FA
Image


Top
 Profile  
 PostPosted: 23 Mar, 2011 
 

Joined: 17 Mar, 2011
Posts: 33
Offline
Thanks a lot, Paceydre, the script did the trick! Since this problem got solved I continued shaping the map as a friend and I played 2vs2AI. We've had great fun with it already, even though I didn't texture it yet and didn't add any probs (it's a true desert atm :roll:).

FA arrived today and as much as I wanted to test the new AIs, I found that my map didn't show up even though I copied to the map's folder to my FA maps directory. Do I need any changes to make it FA compatible? I've tried google multiple times but since this game is dated it's really hard to find any information. :(


Top
 Profile  
 PostPosted: 24 Mar, 2011 
 
User avatar

Joined: 12 Mar, 2007
Posts: 134
Location: Australia
Offline
All maps that work with the original Supreme Commander will also work with FA.

AI performance will be greatly improved if you provide ‘FA markers’, especially the ‘rally point’, ’waypoint’ and ‘large expansion’ markers.

To play your map in FA just copy the new map’s folder from
‘C:\Program Files\THQ\Gas Powered Games\Supreme Commander\maps’
to
‘C:\Documents and Settings\roger\My Documents\My Games\Gas Powered Games\Supreme Commander Forged Alliance\Maps’.
It will then show up under FA game options map list.

Your approach is good and will create a game that runs fast, avoiding the frustrating slowdown that occurs on large square maps against the AI.
Rectangular maps feel larger 'in game' than they really are.

Note: The Sorian AI is more intelligent and runs much faster that the AI that comes with FA.
We use sorian_ai_pack_2.0.01 for TeamPlay.


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



Quick Tools

Search for:
Jump to:  

© 2002-2010 Gas Powered Games Corp. All Rights Reserved. Gas Powered Games is the exclusive trademark of Gas Powered Games Corp.
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
 
Home| Games | Company | News & Press | Support
  Terms of Use   |    Copyright Information   |    Privacy Policy