Creating new planets in GC

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Creating new planets in GC

Post by Deviss »

hi there :D i got make custom side etc but still i cant get make new planets , this is my file:
ifs_freeform_init_zer.lua
Hidden/Spoiler:
-- initialize for Zer War
print("ifs_freeform_init_zer.lua")
ifs_freeform_init_zer = function(this, REP, CIS)
print("ifs_freeform_init_zer: ifs_freeform_init_zer()")

-- common init
ifs_freeform_init_common(this)

--replacing this table from init_common, by [RDH]Zerted
-- per-planet camera offsets
this.cameraOffset = {
["cor"] = { 0, 1, 1 },
["dag"] = { 0, 1, 1 },
["end"] = { 0, 1, 1 },
["fel"] = { 0, 1, 1 },
["geo"] = { 0, 1, 1 },
["hot"] = { 0, 1, 1 },
["kas"] = { 0, 1, 1 },
["kam"] = { 0, 1, 1 },
["mus"] = { 0, 1, 1 },
["myg"] = { 0, 1, 1 },
["nab"] = { 0, 1, 1 },
["neb"] = { 0, 1, 1 },
["pol"] = { 0, 1, 1 },
["tat"] = { 0, 1, 1 },
["uta"] = { 0, 1, 1 },
["yav"] = { 0, 1, 1 },
}

-- default victory condition (take all planets)
this:SetVictoryPlanetLimit(nil)

-- associate codes with teams
this.teamCode = {
[REP] = "rep",
[CIS] = "cis"
}

ifs_purchase_unit_types = { "soldier", "pilot", "assault", "sniper", "marine", "engineer", "officer", "special", "commander" }

ifs_purchase_unit_name = {
soldier = "rifleman",
pilot = "pilot",
assault = "rocketeer",
sniper = "sniper",
marine = "marine",
engineer = "engineer",
officer = "officer",
special = "special",
commander = "commander",
}

ifs_purchase_unit_cost = {
soldier = 0,
pilot = 0,
assault = 50,
sniper = 50,
marine = 50,
engineer = 50,
officer = 80,
special = 80,
commander = 10,
}

rifle_anim_set = {
animbanks = { "human_0" },
--unselected = "human_rifle_crouch_idle_emote_full",
unselected = { upper = "human_rifle_stand_idle_emote_full", lower = "human_rifle_stand_idle_emote_full" },
select_start = "human_rifle_stand_idle_lookaround_full",
select_loop = { upper = "human_rifle_stand_idle_emote_full", lower = "human_rifle_stand_idle_emote_full" },
}

bazooka_anim_set = {
animbanks = { "human_0", "human_2" },
--unselected = "human_bazooka_crouch_idle_emote",
unselected = { upper = "human_bazooka_stand_idle_emote", lower = "human_rifle_stand_idle_emote_full" },
select_start = "human_bazooka_stand_idle_lookaround",
select_loop = { upper = "human_bazooka_stand_idle_emote", lower = "human_rifle_stand_idle_emote_full" },
}

marksperson_anim_set = {
animbanks = { "marksperson", "human_0" },
--unselected = "human_rifle_crouch_idle_emote_full",
unselected = { upper = "human_rifle_stand_idle_emote_full", lower = "human_rifle_stand_idle_emote_full" },
select_start = "human_rifle_stand_idle_lookaround_full",
select_loop = { upper = "human_rifle_stand_idle_emote_full", lower = "human_rifle_stand_idle_emote_full" },
}

wookiee_anim_set = {
animbanks = { "wookie", "human_0" },
unselected = { upper = "human_rifle_stand_idle_emote_full", lower = "human_rifle_stand_idle_emote_full" },
select_start = "human_rifle_stand_idle_lookaround_full",
select_loop = { upper = "human_rifle_stand_idle_emote_full", lower = "human_rifle_stand_idle_emote_full" },
}

bdroid_rifle_anim_set = {
animbanks = { "bdroid", "human_0" },
unselected = "human_rifle_stand_idle_emote_full",
select_start = "human_rifle_stand_idle_lookaround_full",
select_loop = "human_rifle_stand_idle_emote_full",
}

bdroid_bazooka_anim_set = {
animbanks = { "bdroid", "human_0", "human_2" },
unselected = { upper = "human_bazooka_stand_idle_emote", lower = "human_rifle_stand_idle_emote_full" },
select_start = "human_bazooka_stand_idle_lookaround",
select_loop = { upper = "human_bazooka_stand_idle_emote", lower = "human_rifle_stand_idle_emote_full" },
}

sbdroid_anim_set = {
animbanks = { "sbdroid", "human_0" },
unselected = { upper = "sbdroid_rifle_stand_idle_emote", lower = "human_rifle_stand_idle_emote_full" },
select_start = "sbdroid_rifle_standalert_idle_emote",
select_loop = { upper = "sbdroid_rifle_stand_idle_emote", lower = "human_rifle_stand_idle_emote_full" },
}

magnaguard_anim_set = {
animbanks = { "magnaguard", "human_0" },
unselected = { upper = "human_rifle_stand_idle_emote_full", lower = "human_rifle_stand_idle_emote_full" },
select_start = "human_rifle_stand_idle_lookaround_full",
select_loop = { upper = "human_rifle_stand_idle_emote_full", lower = "human_rifle_stand_idle_emote_full" },
}

droideka_anim_set = {
animbanks = { "cis_walk_droideka" },
unselected = "fold",
unselected_oneshot = 1,

select_start = "unfold",
select_loop = "idle",
}

-- sound formats
ifs_purchase_team_table = {
rep = {
file = "..\\..\\addon\\ABC\\data\\_LVL_PC\\SIDE\\DEV.lvl",

classes = {
soldier = {
name = "entity.rep.clone1",
info = "ifs.freeform.purchase.military.sides.rep.soldier",
sound = "mtg_rep_unit_name_rifleman",
body = "rep_inf_ep3trooper",
weapon = "rep_weap_DC-15x_Rifle",
anim_set = rifle_anim_set
},
pilot = {
name = "entity.rep.clone2",
info = "ifs.freeform.purchase.military.sides.rep.pilot",
sound = "mtg_rep_unit_name_pilot",
body = "rep_inf_ep3heavytrooper",
weapon = "rep_weap_inf_launcher",
anim_set = bazooka_anim_set
},
assault = {
name = "entity.rep.clone3",
info = "ifs.freeform.purchase.military.sides.rep.assault",
sound = "mtg_rep_unit_name_rocketeer",
body = "rep_inf_ep3sniper",
weapon = "rep_weap_DC-15x_Sniper_Rifle",
anim_set = rifle_anim_set
},
sniper = {
name = "entity.rep.clone4",
info = "ifs.freeform.purchase.military.sides.rep.sniper",
sound = "mtg_rep_unit_name_sniper",
body = "rep_inf_ep3_Clone_Commander_Faie",
weapon = "rep_weap_DC-15x_Carbine",
anim_set = rifle_anim_set
},
marine = {
name = "entity.rep.clone5",
info = "ifs.freeform.purchase.military.sides.rep.marine",
sound = "mtg_rep_unit_name_marine",
body = "rep_inf_Mandalorian_Soldier",
weapon = "com_weap_SFOR_carbine",
anim_set = rifle_anim_set
},
engineer = {
name = "entity.rep.clone6",
info = "ifs.freeform.purchase.military.sides.rep.engineer",
sound = "mtg_rep_unit_name_engineer",
body = "rep_inf_ARF_trooper",
weapon = "com_weap_VF5_chaingun",
anim_set = rifle_anim_set
},
officer = {
name = "entity.rep.clone7",
info = "ifs.freeform.purchase.military.sides.rep.officer",
sound = "mtg_rep_unit_name_officer",
body = "rep_inf_SandTrooper",
weapon = "com_weap_T-21_Blaster_Cannon",
anim_set = rifle_anim_set
},
special = {
name = "entity.rep.clone8",
info = "ifs.freeform.purchase.military.sides.rep.special",
sound = "mtg_rep_unit_name_special",
body = "imp_inf_Phase3_Imperial_Commando",
weapon = "rep_weap_DC-17m_Blast",
anim_set = rifle_anim_set
},
commander = {
name = "entity.rep.clone9",
info = "ifs.freeform.purchase.military.sides.rep.commander",
sound = "mtg_rep_unit_name_marine",
body = "rep_inf_ep3_clone_commander",
weapon = "rep_weap_DC-15x_Rifle",
anim_set = rifle_anim_set
},
}
},

cis = {
file = "side\\cisshell.lvl",

classes = {
soldier = {
name = "entity.cis.inf_rifleman",
info = "ifs.freeform.purchase.military.sides.cis.soldier",
sound = "mtg_cis_unit_name_rifleman",
body = "cis_inf_sbdroid",
weapon = nil,
anim_set = sbdroid_anim_set
},
pilot = {
name = "entity.cis.inf_pilot",
info = "ifs.freeform.purchase.military.sides.cis.pilot",
sound = "mtg_cis_unit_name_pilot",
body = "cis_inf_bdroid",
weapon = "cis_weap_inf_pistol",
anim_set = bdroid_rifle_anim_set
},
assault = {
name = "entity.cis.inf_rocketeer",
info = "ifs.freeform.purchase.military.sides.cis.assault",
sound = "mtg_cis_unit_name_rocketeer",
body = "cis_inf_bdroid",
weapon = "cis_weap_inf_launcher",
anim_set = bdroid_bazooka_anim_set
},
sniper = {
name = "entity.cis.inf_sniper",
info = "ifs.freeform.purchase.military.sides.cis.sniper",
sound = "mtg_cis_unit_name_sniper",
body = "cis_inf_bdroid",
weapon = "cis_weap_inf_sniperrifle",
anim_set = bdroid_rifle_anim_set
},
marine = {
name = "entity.cis.inf_marine",
info = "ifs.freeform.purchase.military.sides.cis.marine",
sound = "mtg_cis_unit_name_marine",
body = "cis_inf_bdroid",
weapon = "cis_weap_inf_rifle",
anim_set = bdroid_rifle_anim_set
},
engineer = {
name = "entity.cis.inf_engineer",
info = "ifs.freeform.purchase.military.sides.cis.engineer",
sound = "mtg_cis_unit_name_engineer",
body = "cis_inf_bdroid",
weapon = "cis_weap_inf_pistol",
anim_set = bdroid_rifle_anim_set
},
officer = {
name = "entity.cis.inf_officer",
info = "ifs.freeform.purchase.military.sides.cis.officer",
sound = "mtg_cis_unit_name_officer",
body = "cis_inf_magnaguard",
weapon = "com_weap_inf_torpedo",
anim_set = magnaguard_anim_set
},
special = {
name = "entity.cis.inf_droideka",
info = "ifs.freeform.purchase.military.sides.cis.special",
sound = "mtg_cis_unit_name_special",
body = "cis_walk_droideka",
weapon = nil,
anim_set = droideka_anim_set
},
}
}
}

-- use Zer setup
this.Setup = function(this)
print("ifs_freeform_init_zer: ifs_freeform_init_zer(): Setup()")

-- remove unused planets
print("ifs_freeform_init_zer: ifs_freeform_init_zer(): Setup(): Removing unused planets")
DeleteEntity("tantive")
CreateEntity("star01", GetEntityMatrix, "bes")

-- create the connectivity graph
this.planetDestination = {
["cor"] = { "star20", "star18", "star17" },
["dag"] = { "star05", "nab", "star06" },
["end"] = { "star20", "star19", "bes" },
["fel"] = { "star13", "yav", "star14", "star11" },
["geo"] = { "star08", "star07", "star10", "star09" },
["hot"] = { "star02", "star03" },
["kas"] = { "star12", "star13", "star15", "star17" },
["kam"] = { "star12", "star13", "tat", "star11" },
["mus"] = { "star02", "star04", "star05" },
["myg"] = { "star17", "star18", "star15", "star16" },
["nab"] = { "star17", "star12", "star07", "dag" },
["pol"] = { "star03", "star04" },
["tat"] = { "star10", "kam", "star11", "star09" },
["uta"] = { "star04", "star05", "star06" },
["yav"] = { "star15", "fel", "star14", "star16" },
["bes"] = { "end", "star02" },
["star02"] = { "mus", "star20", "bes", "hot" },
["star03"] = { "hot", "pol" },
["star04"] = { "mus", "pol", "uta" },
["star05"] = { "mus", "dag", "uta" },
["star06"] = { "uta", "dag", "star07", "star08" },
["star07"] = { "nab", "geo", "star06" },
["star08"] = { "star06", "geo" },
["star09"] = { "tat", "geo" },
["star10"] = { "geo", "star12", "tat" },
["star11"] = { "kam", "fel", "tat" },
["star12"] = { "kam", "nab", "kas", "star10" },
["star13"] = { "kas", "kam", "fel" },
["star14"] = { "fel", "yav" },
["star15"] = { "kas", "yav", "myg" },
["star16"] = { "yav", "myg" },
["star17"] = { "cor", "myg", "kas", "nab" },
["star18"] = { "cor", "myg", "star19" },
["star19"] = { "end", "star18" },
["star20"] = { "star02", "end", "cor" },
}

-- resource value for each planet
this.planetValue = {
["bes"] = { victory = 60, defeat = 20, turn = 3 },
["cor"] = { victory = 60, defeat = 20, turn = 3 },
["dag"] = { victory = 50, defeat = 20, turn = 3 },
["end"] = { victory = 100, defeat = 35, turn = 10 },
["fel"] = { victory = 50, defeat = 20, turn = 3 },
["geo"] = { victory = 100, defeat = 35, turn = 10 },
["hot"] = { victory = 100, defeat = 35, turn = 10 },
["kas"] = { victory = 50, defeat = 20, turn = 3 },
["kam"] = { victory = 100, defeat = 35, turn = 10 },
["mus"] = { victory = 60, defeat = 20, turn = 3 },
["myg"] = { victory = 50, defeat = 20, turn = 3 },
["nab"] = { victory = 60, defeat = 20, turn = 3 },
["pol"] = { victory = 50, defeat = 20, turn = 3 },
["tat"] = { victory = 50, defeat = 20, turn = 3 },
["uta"] = { victory = 60, defeat = 20, turn = 3 },
["yav"] = { victory = 50, defeat = 20, turn = 3 },
}

this.spaceValue = {
victory = 50, defeat = 20,
}

-- mission to launch for each planet
this.spaceMission = {
["con"] = { "spa3y_Diet Dr. Pepper", "spa6y_Diet Dr. Pepper", "spa7y_Diet Dr. Pepper" }
}
this.planetMission = {
["bes"] = {
["con"] = { "bes1y_con", "bes2y_con" }
},
["cor"] = {
["con"] = { "CO2y_con", "cor1y_con", "QXYy_con" }
},
["dag"] = {
["con"] = "dag1y_con",
},
["end"] = {
["con"] = "end1y_con",
},
["fel"] = {
["con"] = { "fel1y_con", "fel2y_con" }
},
["geo"] = {
["con"] = "geo1y_con",
},
["hot"] = {
["con"] = "hot1y_con",
},
["kam"] = {
["con"] = "kam1y_con",
},
["kas"] = {
["con"] = { "kas1y_con", "kas2y_con", "kas3y_con", "KKDy_con", "KTVy_con" }
},
["mus"] = {
["con"] = { "DB1y_con", "mus1y_con" }
},
["myg"] = {
["con"] = { "MCWy_con", "MHAy_con", "myg1y_con" }
},
["nab"] = {
["con"] = { "nab1y_con", "nab2y_con" }
},
["pol"] = {
["con"] = "pol1y_con",
},
["tat"] = {
["con"] = "tat1y_con",
},
["uta"] = {
["con"] = "uta1y_con",
},
["yav"] = {
["con"] = "yav1y_con",
},
}

-- associate names with teams
this.teamName = {
[0] = "",
[REP] = "common.sides.rep.name",
[CIS] = "common.sides.cis.name"
}

-- associate names with team bases
this.baseName = {
[REP] = "ifs.freeform.base.rep",
[CIS] = "ifs.freeform.base.cis"
}

-- associate names with team fleets
this.fleetName = {
[0] = "",
[REP] = "ifs.freeform.fleet.rep",
[CIS] = "ifs.freeform.fleet.cis"
}

-- associate entity class with team fleets
this.fleetClass = {
[REP] = "gal_prp_assaultship",
[CIS] = "gal_prp_fedcruiser"
}

-- associate icon textures with team fleets
this.fleetIcon = {
[REP] = "rep_fleet_normal_icon",
[CIS] = "cis_fleet_normal_icon"
}
this.fleetStroke = {
[REP] = "rep_fleet_normal_stroke",
[CIS] = "cis_fleet_normal_stroke"
}

-- set the explosion effect for each team
this.fleetExplosion = {
[REP] = "gal_sfx_assaultship_exp",
[CIS] = "gal_sfx_fedcruiser_exp"
}

-- team base planets
this.planetBase = {
[REP] = "kam",
[CIS] = "geo"
}

-- team potential starting locations
this.planetStart = {
[REP] = { "cor", "kam", "nab" },
[CIS] = { "geo", "uta", "mus" },
}

print("ifs_freeform_init_zer: ifs_freeform_init_zer(): Setup(): Finished")
end
end
BFront2.txt
Hidden/Spoiler:
Opened logfile BFront2.log 2010-08-17 1334
shell_interface: Entered
shell_interface: gPlatformStr, gOnlineServiceStr, gLangStr, gLangEnum: PC GameSpy spanish 1
ifs_era_handler - Entered
ifs_era_handler - Exited
shell_interface: No custom_gc_0.lvl
shell_interface: No custom_gc_1.lvl
shell_interface: No custom_gc_2.lvl
shell_interface: No custom_gc_3.lvl
shell_interface: No custom_gc_4.lvl
shell_interface: Found custom_gc_5.lvl
custom_gc_5: Entered
ifs_freeform_init_zer.lua
ifs_freeform_start_zer.lua
custom_gc_5: Taking control of custom_GetGCButtonList()...
custom_gc_5: Taking control of custom_PressedGCButton()...
custom_gc_5: Exited
shell_interface: No custom_gc_6.lvl
shell_interface: No custom_gc_7.lvl
shell_interface: No custom_gc_8.lvl
shell_interface: No custom_gc_9.lvl
shell_interface: No custom_gc_10.lvl
custom_EraButtonList(): Finished building era button table Known eras buttons: 28
custom_GetGMapEras(): Finished building era table Known eras: 28
custom_GetGMapModes(): Finished building game mode table Known Modes: 39
custom_GetMPGameModeList(): Finished building game mode list table List Length: 40
custom_SetMovieLocation()
custom_gc_5: custom_GetGCButtonList(): Entered
custom_GetGCButtonList()
custom_gc_5: custom_GetGCButtonList(): Exited
custom_SetMovieLocation()
custom_GetFreeformBattleModeList(): Finished building freeform battle mode list Known Modes: 39
ingame stream movies\crawlsp.mvs
shell_interface: Opening movie: movies\shellsp.mvs
shell_interface: Leaving
Mission Checker: Entered addme
Mission Checker: addme: Now listening in on AddDownloadableContent() calls
Mission Checker: Exited addme
Cannot find side\rvs.lvl
prev = none iLastPage = nil
prev = texture iLastPage = 2
prev = texture iLastPage = 3
ifs_legal.Exit

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\GameMovie.cpp(399)
Unable to find open movie segment shell_main

ifs_saveop_DoOps LoadFileList
ifs_saveop_DoOps LoadFileList
ifs_saveop_DoOps LoadProfile
ifs_saveop_DoOps LoadProfile
ifs_sp_campaign: Input_Accept(): Entered: _tab_gc
custom_gc_5: custom_PressedGCButton(): Entered
ifs_freeform_start_zer(): Entered
ifs_freeform_start_zer(): Init
ifs_freeform_init_zer: ifs_freeform_init_zer()
ifs_freeform_init_common: ifs_freeform_init_common()
ifs_freeform_main: SetVictoryPlanetLimit()
SetVictoryPlanetLimit nil
ifs_freeform_init_common: ifs_freeform_controllers()
ifs_freeform_start_zer(): Finished
custom_gc_5: custom_PressedGCButton(): Exited
ifs_freeform_main: Enter()
ifs_freeform_main: OneTimeInit()
ifs_freeform_init_zer: ifs_freeform_init_zer(): Setup()
ifs_freeform_init_zer: ifs_freeform_init_zer(): Setup(): Removing unused planets

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(668)
EntityClass "star01" not found
ifs_freeform_init_zer: ifs_freeform_init_zer(): Setup(): Finished

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(635)
Entity "bes" not found

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(635)
Entity "bes_fleet1" not found

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(635)
Entity "bes_fleet2" not found
ifs_freeform_start_zer(): Start(): Entered
ifs_freeform_init_common: ifs_freeform_start_common()
ifs_freeform_main: SetActiveTeam()
ifs_freeform_main: SelectPlanet()
ifs_freeform_main: Exit()
ifs_freeform_main: GetResources()

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(635)
Entity "bes" not found

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LuaHelper.cpp(312)
CallProc failed: (none):0: attempt to compare nil with number
stack traceback:
(none): in function <(none):283>


Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(635)
Entity "bes" not found

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LuaHelper.cpp(312)
CallProc failed: (none):0: attempt to perform arithmetic on a nil value
stack traceback:
(none): in function <(none):652>


Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(635)
Entity "bes" not found

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(635)
Entity "bes" not found

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(635)
Entity "bes_system" not found

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(635)
Entity "bes_system" not found
anyone could help me please :D?

thanks in advance
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: creating new planets in GC

Post by Teancum »

I could be wrong but that's not how you use GetEntityMatrix(). Just guessing it would be:
--Create our object first
CreateEntity("star01", GetEntityMatrix("tantive"), "bes")
--Then delete the old object
DeleteEntity("tantive")
Usage:
CreateEntity(objectclass, location, newobjectname)
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Creating new planets in GC

Post by Deviss »

many thanks for help :D , i am trying convert star01 to bes (bespin) i tried your:

-- remove unused planets
print("ifs_freeform_init_zer: ifs_freeform_init_zer(): Setup(): Removing unused planets")
CreateEntity("star01", GetEntityMatrix("tantive"), "bes")
DeleteEntity("tantive")
but this crash :S , also i tried this:

-- remove unused planets
print("ifs_freeform_init_zer: ifs_freeform_init_zer(): Setup(): Removing unused planets")
CreateEntity(GetEntityMatrix("star01"), "bes")
DeleteEntity("star01")
DeleteEntity("tantive")

and this cause black window :S

EDIT
i tried this also but crash :S

-- remove unused planets
print("ifs_freeform_init_zer: ifs_freeform_init_zer(): Setup(): Removing unused planets")
CreateEntity("bes", GetEntityMatrix("star01"), "bes")
DeleteEntity("star01")
DeleteEntity("tantive")
:(
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Creating new planets in GC

Post by [RDH]Zerted »

I've never made a new planet.

Looked at the DrawPlanetIcons function in ifs_freeform_main.lua. Figure out where the planetDestination, planetTeam, and planetMatrix tables are given their data. I'd guess that's where one would add a new planet.
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Creating new planets in GC

Post by Teancum »

The problem is that I don't know that they're entities -- at least as far as the standard definition goes. I think they're just models that are referenced by the luas, as they all have very specific locations.
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Creating new planets in GC

Post by Deviss »

[RDH]Zerted wrote:I've never made a new planet.

Looked at the DrawPlanetIcons function in ifs_freeform_main.lua. Figure out where the planetDestination, planetTeam, and planetMatrix tables are given their data. I'd guess that's where one would add a new planet.
i tried this previously:
Hidden/Spoiler:
DrawPlanetIcons = function(this, alpha)
alpha = alpha or this.renderAlpha
-- draw planet icons
for planet, _ in pairs(this.planetDestination) do
local team = this.planetTeam[planet] or 0
local matrix = this.planetMatrix[planet][0]
local r,g,b = this:GetTeamColor(team)
if team ~= 0 then
DrawParticleAt(matrix, "planetgraphic_halo", 75, r, g, b, 20 * alpha, 0.0)
else
DrawParticleAt(matrix, "planetgraphic_halo", 3, r, g, b, 192 * alpha, 0.0)
end
if planet == this.planetSelected then
local size = ScriptCB_GetMissionTime()
size = size - math.floor(size)
local a = 224 * (1 - size * size)
size = 14 * size + 4
DrawParticleAt(matrix, "planetgraphic_cursor", size, r, g, b, a * alpha, 0.0)
-- elseif team ~= 0 then
-- DrawParticleAt(matrix, "planetgraphic_cursor", 16, r, g, b, 192, 0.0)
end

if team ~= 0 then
local base = planet == this.planetBase[team]

local size = base and 24 or 16
DrawParticleAt(matrix, "star_flare", size, r, g, b, 128 * alpha, 0.0)
DrawParticleAt(matrix, "star_flare", size * 0.5, 255, 255, 255, 255 * alpha, 0.0)

if base then
local matrix = this.planetMatrix[planet][3]
local side = this.teamCode[team]
DrawParticleAt(matrix, "seal_" .. side, 12, r, g, b, 192 * alpha, 0.0)
end
end
end
end,
changing planet by bes (bespin) for example i tried some mixies but didnt work :S
do you know about my other GC question :D ??
Teancum wrote:The problem is that I don't know that they're entities -- at least as far as the standard definition goes. I think they're just models that are referenced by the luas, as they all have very specific locations.
but if they are model , i could change model planets (graphic ?? ), but if bfront2.lvl said: entity bes not found so he saing they are entity no ?? i hate dont know nothing xD
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Creating new planets in GC

Post by Teancum »

Deviss wrote:if bfront2.lvl said: entity bes not found so he saing they are entity no ?? i hate dont know nothing xD
That only means that SWBF2 can't find something the LUA said was an entity. Your code told the game to look for the "bes" entity, but one doesn't exist.
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Creating new planets in GC

Post by Deviss »

Teancum wrote:
Deviss wrote:if bfront2.lvl said: entity bes not found so he saing they are entity no ?? i hate dont know nothing xD
That only means that SWBF2 can't find something the LUA said was an entity. Your code told the game to look for the "bes" entity, but one doesn't exist.
ouch :S , so i need know how create it as entity if is, if not i need know how change names only, also i dont know about ***_system and ***_camera :S
Post Reply