Go Back   GameFront Forums > The Games > Star Wars: Empire At War > SW:EaW Modding, Mapping and Editing

Remember Me?

SW:EaW Modding, Mapping and Editing Want more info about a Mod? Making a Mod? Looking for Modders, Mappers, Skinners, etc.? This is your Spot!

Reply
 
LinkBack Thread Tools Display Modes
Old November 21st, 2012   #1
Cborg
 
USS-Constitution-A's Avatar
 
Join Date: April 9th, 2004
Location: The Final Frontier
Status: Available
Posts: 8
Rep Power: 0
USS-Constitution-A is a n00b
icon_question Tech Level : Fighter problem: Revisited

HTML Code:
http://forums.filefront.com/sw-eaw-modding-mapping-editing/290874-tech-level-fighter-problem.html
This thread was created six years ago. I was wondering if anybody has solved the problem or found a workaround as I am trying to create more tech levels to play with so that I don't have to create a new faction and clone everything. I am creating an Equal Footing GC but in the New Republic era with the Tech levels 5-9 instead of 1-5.

Thank you for your assistance.
USS-Constitution-A is offline   Reply With Quote
Old November 23rd, 2012   #2
I'm too cool to Post
 
Join Date: November 19th, 2012
Status: Available
Posts: 7
Rep Power: 0
Shard Obsidia is a n00b
Default Re: Tech Level : Fighter problem: Revisited

I ran into this problem as well. I'm searching for and hoping for an answer.

My fellow modder and I theorized that this could possibly be a hard-coded problem. We think it is possible that the game, at each tech level, is coded to check for fighters of that level to launch, and if not, to launch the next available tech level. We think they could have simply coded each tech level from 5 through 0 to check for fighters, but never coded 6. This is why some people have said something along the lines of Rebels being able to still launch at tech 6, since their actual level in the xml is only 5.

Last edited by Shard Obsidia; November 23rd, 2012 at 08:59 AM.
Shard Obsidia is offline   Reply With Quote
Old November 23rd, 2012   #3
The forums staffers think I'm Cool
 
SmallPox's Avatar
 
Join Date: June 14th, 2007
Location: Germany
Status: Available
Posts: 196
Rep Power: 0
SmallPox is a n00b
Send a message via MSN to SmallPox
Default Re: Tech Level : Fighter problem: Revisited

It's hardcoded. You can't do it with XMLs, since the spawning tag is limited to the tech levels "_0" to "_5".

You could get around it by attaching a LUA script to the capital ships that checks for the player's tech level (Object.Get_Owner().Get_Tech_Level() ) and spawn fighter squadrons accordingly.
Well, that only works if .Get_Tech_Level() returns something useful for tech levels over 5, I haven't tested that.


SmallPox is offline   Reply With Quote
Old November 28th, 2012   #4
I'm too cool to Post
 
Join Date: November 19th, 2012
Status: Available
Posts: 7
Rep Power: 0
Shard Obsidia is a n00b
Default Re: Tech Level : Fighter problem: Revisited

Quote:
Originally Posted by SmallPox View Post
You could get around it by attaching a LUA script to the capital ships that checks for the player's tech level (Object.Get_Owner().Get_Tech_Level() ) and spawn fighter squadrons accordingly.
We have been trying to figure out LUA to try to code this.

1) What are the scripts to spawn fighters and how does one link the cap ships to them?
2) Additionally, how do you get it to call for the bit where it reads the xml file to see what ships are set to spawn?
Shard Obsidia is offline   Reply With Quote
Old November 28th, 2012   #5
The forums staffers think I'm Cool
 
SmallPox's Avatar
 
Join Date: June 14th, 2007
Location: Germany
Status: Available
Posts: 196
Rep Power: 0
SmallPox is a n00b
Send a message via MSN to SmallPox
Default Re: Tech Level : Fighter problem: Revisited

Quote:
Originally Posted by Shard Obsidia View Post
We have been trying to figure out LUA to try to code this.

1) What are the scripts to spawn fighters and how does one link the cap ships to them?
2) Additionally, how do you get it to call for the bit where it reads the xml file to see what ships are set to spawn?

To 1)
Well, they aren't there yet, you'll have to write them
You can attach a script to any object by using the <Lua_Script>Lua_Name</Lua_Script> tag.

2) You don't, all that has to be set in the Lua script.

EDIT: There you go, it's untested, though.
You'll have to remove the spawn code from the xml to see if this works properly.
Code:
--///////////////////////////////////////////////////////////
-- Spawn Fighters depending on Tech Level
--///////////////////////////////////////////////////////////

require("PGStateMachine")
require("PGSpawnUnits")

-- Note: this script will spawn all fighters at once, no reserve forces will be spawned after the squadrons get destroyed
-- Why? I guess it could become quite laggy if a script for every ship constantly checks if the ship's squadrons are still alive


function Definitions()


    DebugMessage("%s -- In Definitions", tostring(Script))


    squadron_strings = {
                {"tech1_fighter", "tech1_bomber"},
                {"tech2_fighter", "tech2_bomber"},
                {"tech3_fighter", "tech3_bomber"},
                {"tech4_fighter", "tech4_bomber"},
                {"tech5_fighter", "tech5_bomber"},
                {"tech6_fighter", "tech6_bomber"}
            }
        
    Define_State("State_Init", State_Init);


end




function State_Init(message)
    if message == OnEnter then

        spawn_list = {}

        spawn_loc = Object.Get_Bone_Position("SPAWN_00") -- spawning bone for your ships goes here!
        -- you should choose one that every ship has, so you don't have to write a script for every ship
        -- maybe even use ROOT

        player_tech = Object.Get_Owner().Get_Tech_Level()

        x = 2 -- amount of fighters
        y = 2 -- amount of bombers

        for i = 1, x, 1 do
            table.insert(spawn_list, squadron_strings[player_tech][1])
        end
        for j = 1, y, 1 do
            table.insert(spawn_list, squadron_strings[player_tech][2])
        end
        SpawnList(spawn_list, spawn_loc, Object.Get_Owner(), false, true)

        ScriptExit()

    end
end



Last edited by SmallPox; November 28th, 2012 at 09:49 AM.
SmallPox is offline   Reply With Quote
Old December 1st, 2012   #6
I'm too cool to Post
 
Join Date: November 19th, 2012
Status: Available
Posts: 7
Rep Power: 0
Shard Obsidia is a n00b
Default Re: Tech Level : Fighter problem: Revisited

Smallpox,

We have been trying to get the script to work that you posted, but no luck yet. We are not using it at tech 6 yet, just tech 1-5 to make sure that it works at all. So far, we haven't figured out what it is that we're doing wrong or what part of the script doesn't work. Thanks for posting your idea though. It's given us something to work with for now. We'll let you know if we can figure it out.
Shard Obsidia is offline   Reply With Quote
Old December 2nd, 2012   #7
Dark Lord Of The Sith
 
Sidious Invader's Avatar
 
Join Date: January 8th, 2007
Location: Bar in lower levels of Coruscant
Status: About to give you a lethal dose of force lightning...
Posts: 889
Rep Power: 14
Sidious Invader is a regular member
Send a message via MSN to Sidious Invader
Default Re: Tech Level : Fighter problem: Revisited

In the squadron strings, where it says tech 1 fighter put the name of the fighter. Squadron.
Sidious Invader is offline   Reply With Quote
Old December 2nd, 2012   #8
The forums staffers think I'm Cool
 
SmallPox's Avatar
 
Join Date: June 14th, 2007
Location: Germany
Status: Available
Posts: 196
Rep Power: 0
SmallPox is a n00b
Send a message via MSN to SmallPox
Default Re: Tech Level : Fighter problem: Revisited

Yeah, as Sidious said, "tech1_fighter" etc are only placeholders for the real squadron names like "Rebel_X-Wing_Squadron".
Also make sure the Lua is placed in Data\Scripts\GameObject\


SmallPox is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7.







   
 
The best serving of video game culture, since 2001. Whether you're looking for news, reviews, walkthroughs, or the biggest collection of PC gaming files on the planet, Game Front has you covered. We also make no illusions about gaming: it's supposed to be fun. Browse gaming galleries, humor lists, and honest, short-form reporting. Game on!

GameFront Forums - Terms of Service - Top
Copyright © 2002-2012 Game Front. All rights reserved. Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.
Forum Theme by Danny King (FileTrekker), Sheepeep & Graeme(rs)