I'm insane and I know it(LUA Stuff happening over here)

Post everything from general questions, to modding questions, to map WIPs to releases. (SWBF1 only)

Moderator: Moderators

Post Reply
SleepKiller
Corporal
Corporal
Posts: 143
Joined: Thu Mar 03, 2011 5:08 pm
xbox live or psn: N/A

I'm insane and I know it(LUA Stuff happening over here)

Post by SleepKiller »

Notice something out of place?

Image

That's right I've added a new button to the SP menu sorry about the bad picture I'm working on separating the menus(Yes their are two there) wanna no how I did it low and be hold a SWBF1 script left in BFII mod tools(Edited by me how it would be in BF1 some stuff was commented out) .

Code: Select all

--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

ifs_sp_vbutton_layout = {
--	yTop = -70,
	xWidth = 650, -- Made 650 to fix bug 8742 - NM 8/18/04
	width = 650,
	xSpacing = 10,
	ySpacing = 5,
	font = "gamefont_large",
	buttonlist = { 
		{ tag = "campaignCW", string = "ifs.sp.campaign.cw", },
		{ tag = "campaignGCW", string = "ifs.sp.campaign.gcw", },
		{ tag = "meta", string = "ifs.sp.meta", },
		{ tag = "ia", string = "ifs.sp.ia", },
	},
	title = "ifs.main.sp",
	rotY = 35,
}

ifs_sp = NewIFShellScreen {
	movieIntro      = nil, -- WAS "ifs_sp_intro",
	movieBackground = "temp_shell", -- WAS "ifs_sp",
	music           = "shell_soundtrack",

	buttons = NewIFContainer {
		ScreenRelativeX = 0.5, -- center
		ScreenRelativeY = 0.5, -- top
		y = 20, -- go slightly down from center
	},

	Enter = function(this, bFwd)
		gIFShellScreenTemplate_fnEnter(this, bFwd) -- call default enter function
        gMovieDisabled = nil

		if(bFwd and ScriptCB_IsMetagameStateSaved()) then
            ifs_movietrans_PushScreen(ifs_meta_new_load)
		end
		if(bFwd and ScriptCB_IsSPStateSaved()) then
			if(gPlatformStr == "PC") then
				ifs_movietrans_PushScreen(ifs_sp_briefing)
			else 
				ifs_movietrans_PushScreen(ifs_sp_era)
			end
		end
		--if( ifs_sp.bForSplitScreen ) then
		--	this.buttons.meta.hidden = 1
		--	IFObj_fnSetVis( this.buttons.meta, nil )
		--else
		--	this.buttons.meta.hidden = nil
		--	IFObj_fnSetVis( this.buttons.meta, 1 )
		--end		

		-- if its splitscreen, change the orange title to say "splitscreen"
		if(ScriptCB_IsSplitscreen()) then
			IFText_fnSetString(this.buttons._titlebar_,"ifs.main.split")
		else
			IFText_fnSetString(this.buttons._titlebar_,"ifs.main.sp")
		end
		

		ShowHideVerticalButtons(this.buttons,ifs_sp_vbutton_layout)
		gMovieAlwaysPlay = 1
	end,
	
	Exit = function(this, bFwd)
		if (not bFwd) then
			gMovieAlwaysPlay = nil

			ScriptCB_SetMetagameRulesOn(nil) -- for ingame
			ScriptCB_SetHistoricalRulesOn(nil)
			ScriptCB_SetCanSwitchSides(1)
		end
		gIFShellScreenTemplate_fnLeave(this, bFwd)
	end,

	Input_Accept = function(this)
		-- If base class handled this work, then we're done
		if(gShellScreen_fnDefaultInputAccept(this)) then
			return
		end

 		ifelm_shellscreen_fnPlaySound(this.acceptSound)
		if(this.CurButton == "ia") then
			ScriptCB_SetMetagameRulesOn(nil) -- for ingame
			ScriptCB_SetHistoricalRulesOn(nil)
			ScriptCB_SetCanSwitchSides(1)
			if(this.bForSplitScreen) then
				ifs_movietrans_PushScreen(ifs_split_map)
			else
				ifs_movietrans_PushScreen(ifs_instant_top)
			end	
		elseif (this.CurButton == "campaignCW") then
			ScriptCB_SetMetagameRulesOn(nil) -- for ingame
			ScriptCB_SetHistoricalRulesOn(1)
			ScriptCB_SetCanSwitchSides(nil)
			if(gPlatformStr == "PC") then
				ifs_sp_briefing.era = "new"
				ifs_movietrans_PushScreen(ifs_sp_briefing)
			else 
				ifs_movietrans_PushScreen(ifs_sp_era)
			end
		elseif (this.CurButton == "campaignGCW") then
			ScriptCB_SetMetagameRulesOn(nil) -- for ingame
			ScriptCB_SetHistoricalRulesOn(1)
			ScriptCB_SetCanSwitchSides(nil)
			if(gPlatformStr == "PC") then
				ifs_sp_briefing.era = "classic"
				ifs_movietrans_PushScreen(ifs_sp_briefing)
			else 
				ifs_movietrans_PushScreen(ifs_sp_era)
			end
			
		elseif (this.CurButton == "meta") then
			-- always clear the quit player here
			ScriptCB_SetQuitPlayer(1)
			-- stop previous movie	
			ScriptCB_SetMetagameRulesOn(1) -- for ingame
			ScriptCB_SetHistoricalRulesOn(nil)
			ScriptCB_SetCanSwitchSides(nil)
			
			if(gPlatformStr == "PC") then
				ifs_movietrans_PushScreen(ifs_meta_opts) --skip the load/new screen on PC
			else
				ifs_movietrans_PushScreen(ifs_meta_new_load)
			end
		end
	end,
}


ifs_sp.CurButton = AddVerticalButtons(ifs_sp.buttons,ifs_sp_vbutton_layout)
AddIFScreen(ifs_sp,"ifs_sp")
And you put this in addme.lua and boom you have it :)

It is not a fully working button I'm working on it though.
THEWULFMAN
Space Ranger
Posts: 5557
Joined: Tue Aug 17, 2010 3:30 pm
Projects :: Evolved 2
Location: Columbus, Ohio
Contact:

Re: I'm insane and I know it(LUA Stuff happening over here)

Post by THEWULFMAN »

Wow, great job there, with the recent lua breakthroughs for bf1, I may get it and start modding it too, along side with BF2.

:thumbs:
CommanderCody212
Second Lance Corporal
Second Lance Corporal
Posts: 103
Joined: Mon Feb 14, 2011 4:44 pm
Projects :: BattleFront 1.5 tester
Games I'm Playing :: Battlefront

Re: I'm insane and I know it(LUA Stuff happening over here)

Post by CommanderCody212 »

I have no idea on how modding works, so forgive me for the stupid question.


That's a good thing right?
Hunt, the same thing as in BF2?
THEWULFMAN
Space Ranger
Posts: 5557
Joined: Tue Aug 17, 2010 3:30 pm
Projects :: Evolved 2
Location: Columbus, Ohio
Contact:

Re: I'm insane and I know it(LUA Stuff happening over here)

Post by THEWULFMAN »

CommanderCody212 wrote:I have no idea on how modding works, so forgive me for the stupid question.


That's a good thing right?
Hunt, the same thing as in BF2?

Yes.
:themoreyouknow:
User avatar
bamdur123
Sergeant Major
Sergeant Major
Posts: 243
Joined: Fri Oct 15, 2010 7:15 pm
Projects :: Tython-Siege of Darkness Zombie Hotel
Games I'm Playing :: SWBF 1+2
Location: Ohio, USA

Re: I'm insane and I know it(LUA Stuff happening over here)

Post by bamdur123 »

hm good observation. it seems the addme.lua holdes moer then we thought. with that being said. try some new scripts in different.lua files ill be trying some shell scripts if i can
User avatar
jdee/barc
1st Lieutenant
1st Lieutenant
Posts: 444
Joined: Wed Aug 25, 2010 2:47 pm
Projects :: Battlefront One and a Half
xbox live or psn: No gamertag set
Location: Boston

Re: I'm insane and I know it(LUA Stuff happening over here)

Post by jdee/barc »

try this with other files. does this go in shell/ingame.lvl or common.lvl?
SleepKiller
Corporal
Corporal
Posts: 143
Joined: Thu Mar 03, 2011 5:08 pm
xbox live or psn: N/A

Re: I'm insane and I know it(LUA Stuff happening over here)

Post by SleepKiller »

jdee/barc wrote:try this with other files. does this go in shell/ingame.lvl or common.lvl?
It is a Shell.lvl LUA

After having done more snooping and testing I've found out addme.lua will override most(No sixth slot is possible with this :( ) old LUA filesso I present you a third campaign W.I.P.

The button.
Image
What happens when I click on the button.
Image

Now all I need to do is get adding missions to it and we will be good to go(I have been trying they are pesky).
User avatar
Ginev
Command Sergeant Major
Command Sergeant Major
Posts: 260
Joined: Thu Apr 02, 2009 7:02 am
Projects :: Remaking FR Battlefront 3 Tatooine map.
Games I'm Playing :: nothing for now
xbox live or psn: No gamertag set
Location: Bulgaria

Re: I'm insane and I know it(LUA Stuff happening over here)

Post by Ginev »

Ohh my god!!.You must find how to add missions there.And we can make new campaign.Amazing!!!Keep working. :themoreyouknow: :thumbs:

Edit:I dont understand nothing from coding but in the begining of the codes that you show us look this:
--------------------------------------
ifs_sp_vbutton_layout = {
-- yTop = -70,
xWidth = 650, -- Made 650 to fix bug 8742 - NM 8/18/04
width = 650,
xSpacing = 10,
ySpacing = 5,
font = "gamefont_large",
buttonlist = {
----------------------------------------

You see that yTop = -70 Maybe if you change it you way seperate the hunt mode from the other names in the list.Well dont know i just think so... :sick: :funny2:
SleepKiller
Corporal
Corporal
Posts: 143
Joined: Thu Mar 03, 2011 5:08 pm
xbox live or psn: N/A

Re: I'm insane and I know it(LUA Stuff happening over here)

Post by SleepKiller »

I desprately need shell.req and then I can ger hunt mode working and the new campain(I need it for adding new luas and romoving ifs_sp). And those values control the vertical slant it gives the menu(At least thats what happend when I messed with them).
User avatar
bamdur123
Sergeant Major
Sergeant Major
Posts: 243
Joined: Fri Oct 15, 2010 7:15 pm
Projects :: Tython-Siege of Darkness Zombie Hotel
Games I'm Playing :: SWBF 1+2
Location: Ohio, USA

Re: I'm insane and I know it(LUA Stuff happening over here)

Post by bamdur123 »

Impressive! were getting closer!
SleepKiller
Corporal
Corporal
Posts: 143
Joined: Thu Mar 03, 2011 5:08 pm
xbox live or psn: N/A

Re: I'm insane and I know it(LUA Stuff happening over here)

Post by SleepKiller »

Okay so to get rid of the pesky graphic monster that we create from adding another button to ifs_sp this is going to be the development I'm going to do for it then give the source to you guys so you lot can do what you want with it.
Development Plan

Ifs_SP layout.

Re-localize the Clone Wars campaign to "Light Side Of The Force" it will be turned into a button that takes you to another menu screen to pick from all the good campaigns.

Re-localize the Galactic Civil War campaign to "Dark Side Of The Force" it will be turned into a button that takes you to another menu screen to pick from all the dark campaigns :vader2: .

Galactic Conquest Stays the same.

Instant Action will be changed to a button that takes you to a select screen for modes.

Of course those are just the stuff that is planned after all the poking about I've done it should be
possible to do them all but I'm not 100% about that.

So now I leave you to go try to do this, once more if you have shell.req please post it I probably need it :cry: .

PS. if you use any of the stuff in this thread it would be nice to put this in your readme.

With special thanks to.
SleepKiller
jdee/barc
Teancum
psych0fred
User avatar
Ginev
Command Sergeant Major
Command Sergeant Major
Posts: 260
Joined: Thu Apr 02, 2009 7:02 am
Projects :: Remaking FR Battlefront 3 Tatooine map.
Games I'm Playing :: nothing for now
xbox live or psn: No gamertag set
Location: Bulgaria

Re: I'm insane and I know it(LUA Stuff happening over here)

Post by Ginev »

Hey guys if you think to make this to be some big project i can make maps.I have alot of unreleased maps and i think you can like them.We can use them for the new campaign. :)
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: I'm insane and I know it(LUA Stuff happening over here)

Post by Teancum »

The only person who has shell.req for SWBF1 would be psych0fred. It was never released to the public. Doesn't matter anyway as that still doesn't give up the decompiled SWBF1 lua scripts necessary to do much. You can build a shell.req manually by figuring out what each filename is in shell.lvl and by using SWBF2's as a template. I would suggest grabbing SWBF2's shell.req and comparing it with SWBF2's shell.lvl, then you'll know what to look for in order to make a SWBF1 shell.req.
THEWULFMAN
Space Ranger
Posts: 5557
Joined: Tue Aug 17, 2010 3:30 pm
Projects :: Evolved 2
Location: Columbus, Ohio
Contact:

Re: I'm insane and I know it(LUA Stuff happening over here)

Post by THEWULFMAN »

Teancum wrote:The only person who has shell.req for SWBF1 would be psych0fred. It was never released to the public. Doesn't matter anyway as that still doesn't give up the decompiled SWBF1 lua scripts necessary to do much. You can build a shell.req manually by figuring out what each filename is in shell.lvl and by using SWBF2's as a template. I would suggest grabbing SWBF2's shell.req and comparing it with SWBF2's shell.lvl, then you'll know what to look for in order to make a SWBF1 shell.req.

I have done that sort of thing before with mission.lvls :wink:
Although, alot of guessing is involved :runaway:
If I had BF1, I would volunteer, but seeing as I dont... :|
SleepKiller
Corporal
Corporal
Posts: 143
Joined: Thu Mar 03, 2011 5:08 pm
xbox live or psn: N/A

Re: I'm insane and I know it(LUA Stuff happening over here)

Post by SleepKiller »

Teancum wrote:The only person who has shell.req for SWBF1 would be psych0fred. It was never released to the public. Doesn't matter anyway as that still doesn't give up the decompiled SWBF1 lua scripts necessary to do much. You can build a shell.req manually by figuring out what each filename is in shell.lvl and by using SWBF2's as a template. I would suggest grabbing SWBF2's shell.req and comparing it with SWBF2's shell.lvl, then you'll know what to look for in order to make a SWBF1 shell.req.
He did post the BF1 shell.req on his site but trying to access it now gives you a nice 404 thats why I'm wondering if anyone still has it. As for building a shell.req manully I suppose that does appear to be my only option so I'll atempt it.
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: I'm insane and I know it(LUA Stuff happening over here)

Post by Teancum »

Have you tried contacting him?
SleepKiller
Corporal
Corporal
Posts: 143
Joined: Thu Mar 03, 2011 5:08 pm
xbox live or psn: N/A

Re: I'm insane and I know it(LUA Stuff happening over here)

Post by SleepKiller »

Ginev wrote:Hey guys if you think to make this to be some big project i can make maps.I have alot of unreleased maps and i think you can like them.We can use them for the new campaign. :)
That would be neat once I have this working.

@Teancum I'm stupid I never thought of doing that.

Well I hope to get this working today if I don't well their is tomorrow :) I've just thought up some ways to get this working with out shell.req(I hope they work)
User avatar
bamdur123
Sergeant Major
Sergeant Major
Posts: 243
Joined: Fri Oct 15, 2010 7:15 pm
Projects :: Tython-Siege of Darkness Zombie Hotel
Games I'm Playing :: SWBF 1+2
Location: Ohio, USA

Re: I'm insane and I know it(LUA Stuff happening over here)

Post by bamdur123 »

ucft
{
REQN
{
"script"
"startup"
"interface_util"
"ifelem_button"
"ifelem_roundbutton"
"ifelem_flatbutton"
"ifelem_buttonwindow"
"ifelem_hslider"
"ifelem_popup"
"ifelem_segline"
"ifelem_listmanager"
"ifelem_shellscreen"
"ifelem_titlebar"
"ifelem_borderrect"
"ifelem_animationmgr"
"ifs_movietrans_game"
"ifs_pausemenu"
"ifs_teamstats"
"ifs_personalstats"
"ifs_awardstats"
"ifs_opt_top"
"ifs_opt_general"
"ifs_opt_sound"
"ifs_opt_mp"
"ifs_opt_controller_mode"
"ifs_opt_controller_common"
"ifs_opt_controller_vehunit"
"popups_common"
"popup_ab"
"popup_busy"
"popup_ok"
"popup_yesno"
"popup_yesno_large"
"error_popup"
"popup_loadsave2"
"ifs_saveop"
"ifs_mp_lobby"
"popups_lobby"
"ifs_charselect"
"ifs_mapselect"
"ifs_readyselect"
"ifs_fakeconsole"
"globals"
"game_interface"
"ifs_opt_pckeyboard"
"ifs_opt_pccontrols"
"ifs_opt_pcvideo"
"ifutil_mouse"
"ifelem_editbox"
"ifs_pc_spawnselect"
}

try that. i got it from common.lvl but im pretty sure it is the same...

After i finish some animations and major projects, changing swbf will be my goal.
SleepKiller
Corporal
Corporal
Posts: 143
Joined: Thu Mar 03, 2011 5:08 pm
xbox live or psn: N/A

Re: I'm insane and I know it(LUA Stuff happening over here)

Post by SleepKiller »

bamdur123 wrote:
Hidden/Spoiler:
ucft
{
REQN
{
"script"
"startup"
"interface_util"
"ifelem_button"
"ifelem_roundbutton"
"ifelem_flatbutton"
"ifelem_buttonwindow"
"ifelem_hslider"
"ifelem_popup"
"ifelem_segline"
"ifelem_listmanager"
"ifelem_shellscreen"
"ifelem_titlebar"
"ifelem_borderrect"
"ifelem_animationmgr"
"ifs_movietrans_game"
"ifs_pausemenu"
"ifs_teamstats"
"ifs_personalstats"
"ifs_awardstats"
"ifs_opt_top"
"ifs_opt_general"
"ifs_opt_sound"
"ifs_opt_mp"
"ifs_opt_controller_mode"
"ifs_opt_controller_common"
"ifs_opt_controller_vehunit"
"popups_common"
"popup_ab"
"popup_busy"
"popup_ok"
"popup_yesno"
"popup_yesno_large"
"error_popup"
"popup_loadsave2"
"ifs_saveop"
"ifs_mp_lobby"
"popups_lobby"
"ifs_charselect"
"ifs_mapselect"
"ifs_readyselect"
"ifs_fakeconsole"
"globals"
"game_interface"
"ifs_opt_pckeyboard"
"ifs_opt_pccontrols"
"ifs_opt_pcvideo"
"ifutil_mouse"
"ifelem_editbox"
"ifs_pc_spawnselect"
}

try that. i got it from common.lvl but im pretty sure it is the same...

After i finish some animations and major projects, changing swbf will be my goal.
Yeah it is I'm working on getting it I've got some of it now but main it is hard work gong through it to get the stuff. Cool if you finish them before I get anything done on this would you like to help me with this stuff?.

In stuff that is related to the creation of this yesterday cause this kept happening :cpu: (Except I hit the CPU) I started to fool around and managed to get new movies and music playing in the background over writing the old ones pictures are coming later.

EDIT: Thanks to Teancum's advice I now have shell.req as pschy0fred has fixed all the broken downloads on his site because I e-mailed him.
Post Reply