selection spawn screen modify?

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

selection spawn screen modify?

Post by Deviss »

hello to everybody, i only have knowledge on modeling, so i am trying learn about map, and now about modding(lua script).

so i need know if its possible modify the selection spawn screen for look like carrousel screen from galactic conquest (its same than psp screen)?

i wish make this:
Hidden/Spoiler:
Image
thanks :)
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Re: selection spawn screen modify?

Post by Anakin »

I'd say yes, it is. But then you'll ask me next how, and i'd have no idea. :D

My ideas:
1. Modify the original ifs_charselect (?) file to look like that and load it with your ingame,
2. use an wrapper in an custom gc script to do that. that's actualy what i'm trying to learn right now to fix my font problems and bring back the fakeconsole for RCM
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: selection spawn screen modify?

Post by Teancum »

I can't remember, but either ifs_charselect had a condition to check whether it as PC or not (if it's not on PC, it uses the rotating "character wheel" like you've shown), or whether a different character select screen was used. Either way, I can tell you it's possible as I once accidentally did it on PC several years ago.
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: selection spawn screen modify?

Post by [RDH]Zerted »

There's a non-PC version of the script. It was very easy to accidentally use that one and get stuck.

Skip the custom gc script (and anyway it'd be a user script since it's an ingame screen). Use a stock SWBF2 and directly edit whatever you need to edit. It'll be easier that way and you'll be confused enough as it is. Trying to deal with injecting all your changes instead of just making them would probably make the project too difficult. If you get it working you can always convert it into a custom user script later.

Definitely look at the code for the other carrousels in the game and at the non-PC sources. Do something 'easy' at first like moving a text description or changing what's displayed at the unit location. It might be easier to modify the non-PC script towards the PC version than the PC version towards the non-PC one.
jedimoose32
Field Commander
Field Commander
Posts: 938
Joined: Thu Jan 24, 2008 12:41 am
Projects :: Engineering Degree
Location: The Flatlands of Canada

Re: selection spawn screen modify?

Post by jedimoose32 »

[RDH]Zerted wrote:Definitely look at the code for the other carrousels in the game and at the non-PC sources. Do something 'easy' at first like moving a text description or changing what's displayed at the unit location. It might be easier to modify the non-PC script towards the PC version than the PC version towards the non-PC one.
I've studied the PC version a fair amount and I couldn't find any references to character models or animations. I believe that portion of it is hard-coded. The buttons and text aren't though.
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Re: selection spawn screen modify?

Post by Anakin »

Haven't found the PS2 or XBox spawn script, but i'd say you need to combinate this from the ifs_freeform_sides.lua
Hidden/Spoiler:
[code]do
this = ifs_freeform_sides

if gPlatformStr == "PS2" then
this.bgModel = NewIFModel {
ScreenRelativeX = 0.5,
ScreenRelativeY = 0.5,
ZPos = 255,
model = "shell_cube",
ColorR = 0, ColorG = 0, ColorB = 0,
scale = 1.25,
depth = 0.009,
inert = 1,
}
else
-- note this isn't the safe dimensions!
local w,h,v,widescreen = ScriptCB_GetScreenInfo()

this.bgImage = NewIFImage {
ScreenRelativeX = 0,
ScreenRelativeY = 0,
UseSafezone = 0,
ZPos = 255,
texture = "blank_icon",
ColorR = 0, ColorG = 0, ColorB = 0, alpha = 0.75,
localpos_l = 0,
localpos_t = 0,
localpos_r = w*widescreen,
localpos_b = h,
inert = 1,
}
end

local w,h = ScriptCB_GetSafeScreenInfo()

this.title = NewIFContainer {
ScreenRelativeX = 0.5, -- center
ScreenRelativeY = 0.0, -- top

text = NewIFText {
font = "gamefont_large",
string = "ifs.freeform.picksides",
textw = w,
halign = "hcenter",
valign = "top",
nocreatebackground = 1
}
}

side_w = w * 0.5

this.team1 = NewIFContainer {
ScreenRelativeX = 0.0, -- left
ScreenRelativeY = 0.2, -- top

text = NewIFText {
font = "gamefont_large",
textw = side_w,
x = 0,

halign = "hcenter",
valign = "vcenter",
nocreatebackground = 1
},

icon = NewIFImage {
ZPos = 200,
alpha = 0.25,
localpos_l = side_w * 0.5 - 32,
localpos_t = -32,
localpos_r = side_w * 0.5 + 32,
localpos_b = 32,
inert = 1,
}
}

this.team2 = NewIFContainer {
ScreenRelativeX = 1.0, -- right
ScreenRelativeY = 0.2, -- top

text = NewIFText {
font = "gamefont_large",
textw = side_w,
x = -side_w,

halign = "hcenter",
valign = "vcenter",
nocreatebackground = 1
},

icon = NewIFImage {
ZPos = 200,
alpha = 0.25,
localpos_l = -side_w * 0.5 - 32,
localpos_t = -32,
localpos_r = -side_w * 0.5 + 32,
localpos_b = 32,
inert = 1,
}
}

name_h = h * 0.1

this.players = NewIFContainer {
ScreenRelativeX = 0.0,
ScreenRelativeY = 0.35,
side_x = { [1] = 0, [2] = side_w },
name_y = { [0] = 0, [1] = name_h, [2] = name_h * 2, [3] = name_h * 3 },

[0] = NewIFText {
font = "gamefont_medium",
textw = side_w,

halign = "hcenter",
valign = "vcenter",
nocreatebackground = 1
},

[1] = NewIFText {
font = "gamefont_medium",
textw = side_w,

halign = "hcenter",
valign = "vcenter",
nocreatebackground = 1
},

[2] = NewIFText {
font = "gamefont_medium",
textw = side_w,

halign = "hcenter",
valign = "top",
nocreatebackground = 1
},

[3] = NewIFText {
font = "gamefont_medium",
textw = side_w,

halign = "hcenter",
valign = "top",
nocreatebackground = 1
},
}

local screen_w, screen_h = ScriptCB_GetScreenInfo()
local bar_h = h * .1

this.letterbox_top = NewIFContainer{
ScreenRelativeX = 0.0, --left
ScreenRelativeY = 0.0, --top
texture = "blank_icon",
ZPos = 200,

image = NewIFImage {
texture = "blank_icon",
ColorR = 0, ColorG = 0, ColorB = 0,
-- alpha = 1.0,
ZPos = 200,
localpos_l = -screen_w,
localpos_t = -screen_h,
localpos_r = screen_w,
localpos_b = bar_h,
inert = 1,
},
}

this.letterbox_bottom = NewIFContainer{
ScreenRelativeX = 0.0, --left
ScreenRelativeY = 1.0, --bottom
texture = "blank_icon",
ZPos = 200,

top = NewIFImage {
texture = "blank_icon",
ColorR = 0, ColorG = 0, ColorB = 0,
ZPos = 200,
localpos_l = -screen_w,
localpos_t = -bar_h,
localpos_r = screen_w,
localpos_b = screen_h,
inert = 1,
},
}

this.action = NewIFContainer{
ScreenRelativeX = 0.0, -- left
ScreenRelativeY = 1.0, -- bottom
width = action_w,
header = "Action",
ZPos = 190,


misc = NewHelptext {
x = w,
buttonicon = "btn_directional_pad_LR",
string = "common.change",
bRightJustify = 1,
y = -34,
},


accept = NewHelptext {
x = w,
buttonicon = "btna",
string = "common.select",
bRightJustify = 1,
y = -15,
},

back = NewHelptext {
x = 0,
buttonicon = "btnb",
string = "ifs.freeform.fleet.deselect",
bLeftJustify = 1,
y = -15,
},
}

end[/code]
With the ifs_pc_spawnselect.lua file (specialy only at the part where the units are listed)
Hidden/Spoiler:
[code]
for i = 0,MAX_CLASS_SLOTS do

local tag = string.format("SlotWindow%d",i)

this.Info[tag] = NewButtonWindow
{
ZPos = 200,
x = SlotUnitNameOffsetX + SlotUnitNameOffsetX * 2.5,
y = SlotYOffset + i * ( boxh + textheight + buttonlabelheight + 2 ),
--ScreenRelativeX = 0.0, -- center
--ScreenRelativeY = 0.0,
width = boxw,
height = textheight + boxh,
titleText = "ifs.profile.list",
font = fontsize,
buttonHeightPad = 1,
buttonGutter = 1,
titleOffsetX = 5,
}

this.Info[tag].bHotspot = 1
this.Info[tag].fHotspotX = -0.5 * (boxw)
this.Info[tag].fHotspotY = -0.5 * (textheight + boxh) - buttonlabelheight
this.Info[tag].fHotspotW = boxw
this.Info[tag].fHotspotH = textheight + boxh + buttonlabelheight

this.Info[tag].InfoText = NewIFText --the equipment/weapon text
{
width = boxw,

halign = "hcenter",
valign = "vcenter",
textw = boxw - boxh, -- usable area for text
texth = textheight,
font = smallfontsize,
string = "InfoText",
ColorR = 255, ColorG = 255, ColorB = 255, -- white
flashy = 0,
}

--how many lines of text to squeeze into the info box
local numLines = 4
if numSlots > 7 and screenHeight < 960 then
numLines = 3
end

local textscale = textheight / (numLines * ScriptCB_GetFontHeight(smallfontsize))
--if textscale < 1 then
this.Info[tag].InfoText.HScale = textscale
this.Info[tag].InfoText.VScale = textscale
--end
end
[/code]
let me know if you were successful :D
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: selection spawn screen modify?

Post by Teancum »

jedimoose32 wrote:
[RDH]Zerted wrote:Definitely look at the code for the other carrousels in the game and at the non-PC sources. Do something 'easy' at first like moving a text description or changing what's displayed at the unit location. It might be easier to modify the non-PC script towards the PC version than the PC version towards the non-PC one.
I've studied the PC version a fair amount and I couldn't find any references to character models or animations. I believe that portion of it is hard-coded. The buttons and text aren't though.
It's the same carousel layout that's used when unlocking units for Galactic Conquest on PC. It's not hard-coded.
jedimoose32
Field Commander
Field Commander
Posts: 938
Joined: Thu Jan 24, 2008 12:41 am
Projects :: Engineering Degree
Location: The Flatlands of Canada

Re: selection spawn screen modify?

Post by jedimoose32 »

I was referring to the PC instant action spawn select which doesn't use the carousel. I don't remember seeing any reference to the non-PC versions in there but I could be mistaken.
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: selection spawn screen modify?

Post by Deviss »

Anakin wrote:Haven't found the PS2 or XBox spawn script, but i'd say you need to combinate this from the ifs_freeform_sides.lua
let me know if you were successful :D
Teancum wrote:
jedimoose32 wrote:
[RDH]Zerted wrote:Definitely look at the code for the other carrousels in the game and at the non-PC sources. Do something 'easy' at first like moving a text description or changing what's displayed at the unit location. It might be easier to modify the non-PC script towards the PC version than the PC version towards the non-PC one.
I've studied the PC version a fair amount and I couldn't find any references to character models or animations. I believe that portion of it is hard-coded. The buttons and text aren't though.
It's the same carousel layout that's used when unlocking units for Galactic Conquest on PC. It's not hard-coded.
Many thanks Teancum, Zerted, Anakin and Jedimoose, this monday my pc crashed, after 6 years of use, i am searching about buy a new one, so all my work will be delay, i hope can try soon :), many thanks again, i will have new soon i hope

EDIT: new hard disk!!, well about the script i am checking the file "ifs_pc_spawnselect.lua" it have how will show spawn selection, i tried searching a XBOX/PS2 mod tools (for the scripts) but i didnt find him, so i am trying mixing it file with the one from galactic conquest, many thanks to everybody now i will enjoy mixing lua files :)
User avatar
AnthonyBF2
Sith
Sith
Posts: 1255
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: PS2+PSP Overhaul

Re: selection spawn screen modify?

Post by AnthonyBF2 »

Teancum wrote:I can't remember, but either ifs_charselect had a condition to check whether it as PC or not (if it's not on PC, it uses the rotating "character wheel" like you've shown), or whether a different character select screen was used. Either way, I can tell you it's possible as I once accidentally did it on PC several years ago.
Would you have any memory or idea on what to edit? I have as well always wanted wheel selection mode :)

And yes, computer deaths are sad, good luck on a new machine! :D
Post Reply