SWBFGamers

Modding for the Original SWBF1 and SWBF2 => SWBF1 Modding => Topic started by: Snake on April 05, 2013, 07:48:37 PM

Title: Unit Limit in Locals?
Post by: Snake on April 05, 2013, 07:48:37 PM
Well there is the known 5 unit limit for the two main sides (although apparently it is possible to have more) but is there a limit for locals? I was thinking about how there's no need for first person lines in the .odf's of local sides because real people won't be using them. Well, could the same be said for the unit number? No one will be looking at a selection screen so it seems possible.. I am going to try this out eventually but I'd like to see if anyone has already tried it.
Title: Re: Unit Limit in Locals?
Post by: RepComm on April 05, 2013, 07:59:52 PM
I have absolutely no idea.
But I think if the locals spawn, that the game would crash, because the game sees the problem when locals try to spawn.
It's worth testing though.
Title: Re: Unit Limit in Locals?
Post by: Dark_Phantom on April 05, 2013, 08:36:37 PM
Interestingly enough, the game does not crash.  I placed 8 "AddUnitClass" lines and the game didn't crash and they all spawned fine.  The limit must only be defined with teams 1 and 2.
If only there was some way to switch to team 3 ingame, because then the extra slots could be used.  Although the only way to do that (that I can see) is have the source code (always comes back to that  :dry: ).  Tried switching team 1 to 3 and it wants to find 1  :td:
Title: Re: Unit Limit in Locals?
Post by: Snake on April 05, 2013, 08:39:32 PM
Oh, awesome! I wish we were able to edit the source codes of SWBF..
Title: Re: Unit Limit in Locals?
Post by: SleepKiller on April 05, 2013, 08:40:07 PM
The game isn't limited to how many classes per team it's limited on how many it slots it can display on the spawn screen. So you could have eight classes for team 2 and as long as you never tried to be team 2 the game would never crash.
Title: Re: Unit Limit in Locals?
Post by: RepComm on April 05, 2013, 08:50:47 PM
:facepalm:
Oh, thanks SK.
Title: Re: Unit Limit in Locals?
Post by: Snake on April 05, 2013, 09:17:45 PM
Quote from: SleepKiller on April 05, 2013, 08:40:07 PM
The game isn't limited to how many classes per team it's limited on how many it slots it can display on the spawn screen. So you could have eight classes for team 2 and as long as you never tried to be team 2 the game would never crash.

Sweet, that's what I was hoping for
Title: Re: Unit Limit in Locals?
Post by: Kit Fisto on April 05, 2013, 09:37:25 PM
My question is, what's the use of every single BF1 Lua if we can't solve these types of problems? What can we do with it?! It seems that nobody is using those to make, oh I don't know, a working fake console for singleplayer, pretty much a  SWBFI version of the SWBFII 1.3 patch.
Title: Re: Unit Limit in Locals?
Post by: RepComm on April 05, 2013, 10:29:08 PM
Quote from: Kit Fisto on April 05, 2013, 09:37:25 PM
My question is, what's the use of every single BF1 Lua if we can't solve these types of problems? What can we do with it?! It seems that nobody is using those to make, oh I don't know, a working fake console for singleplayer, pretty much a  SWBFI version of the SWBFII 1.3 patch.
Addon limit as well as Unit limit is controlled by EXE from what I hear, so the lua scripts probably wouldn't help you there, Kit.

I find it kinda funny (by funny I mean sad really), Phobos was reconstructing all those lua scripts, and next thing we know, EVERY single one of them was released at the same time... It was awesome what he did and was doing, and now that those are released, his are in a way obsolete...
Title: Re: Unit Limit in Locals?
Post by: Phobos on April 05, 2013, 11:49:27 PM
Quote from: Kit Fisto on April 05, 2013, 09:37:25 PM
My question is, what's the use of every single BF1 Lua if we can't solve these types of problems? What can we do with it?! It seems that nobody is using those to make, oh I don't know, a working fake console for singleplayer, pretty much a  SWBFI version of the SWBFII 1.3 patch.
The LUAs are useful but not for controlling elements the EXE does. Have you looked at BF1 ifs_fakeconsole.LUA? All the commands and what they do are controlled by exe not the LUA. Anyway the LUA is mostly useful for updating the Shell (to an extent) such as new Campaigns, Eras, and modifying the Galactic Conquest.

If we did have the EXE source, then that combined with the LUA source would make Online Galactic Conquest Multiplayer completely possible I'm 99% sure. The LUA would be more useful than it is now if we had the EXE source, but on its own it still has many good applications just not as much as we had hoped for.

With BF1 exe source I'm certain we could also implement a fake console that lets you type in commands (like you can in SPTest and BF2) but with customizable commands such as change map, change reinforcements, etc.

Perhaps we could even add more customization abilities through the LUA (certain code branches were removed from LUA control and hard-scripted into the exe, like the fake console commands for instance). I'd like to be able to develop new mission LUA commands for various server features (forcing every player to a certain faction, third teams playable, etc.). A lot of testing would need to be done to make it work online but it would be feasible.

Quote from: -RepublicCommando- on April 05, 2013, 10:29:08 PM
Addon limit as well as Unit limit is controlled by EXE from what I hear, so the lua scripts probably wouldn't help you there, Kit.

I find it kinda funny (by funny I mean sad really), Phobos was reconstructing all those lua scripts, and next thing we know, EVERY single one of them was released at the same time... It was awesome what he did and was doing, and now that those are released, his are in a way obsolete...
Reconstructing the LUA scripts helped me get a better understanding of how LUA looks when munged. Knowing how to reconstruct source from munged could be useful if I munged a heavily modified script, then somehow lost the source LUA for it. So they would still be somewhat useful for learning how to reconstruct complex LUAs if it was ever needed. Although I would still recommend using the stock LUA Fred released instead of my reconstructions because the stock source contains all of the developer comments. I'm very glad Fred released the scripts. There's no way I would have been able to perfectly reconstruct those complex ones, like the meta scripts and such.
Title: Re: Unit Limit in Locals?
Post by: Led on April 05, 2013, 11:56:19 PM
I want to point out that 1.3 beta exe has a lot of the things we want in it already, including and in-game log in console for admins and a 256 512 addon map limit.

The only thing we lack is a 1.3 beta no cd version, as the 1.3 beta exe update does not work with the dvd versions of the game.

Now, if we knew the person that made 1.3 beta...
Title: Re: Unit Limit in Locals?
Post by: Phobos on April 06, 2013, 12:13:58 AM
Quote from: Buckler on April 05, 2013, 11:56:19 PM
I want to point out that 1.3 beta exe has a lot of the things we want in it already, including and in-game log in console for admins and a 256 addon map limit.

The only thing we lack is a 1.3 beta no cd version, as the 1.3 beta exe update does not work with the dvd versions of the game.

Now, if we knew the person that made 1.3 beta...

That would help a lot and I think the 1.3 multiplayer servers might be superior to 1.2, and more shots would register since they improved that aspect of the game with the update. But yes, not having a no CD exe holds us back.

1.3 ReadMe
[spoiler]
Quote
Reminder this is a BETA version for Battlefront and may not
work on all systems and is for the U.S. version of the game
only.  Version 1.2 must be installed first in order for this
version to be properly installed

Build Notes

Changes from 1.2

Multiplayer

Unlocked frame rate
Better tolerance of latency spikes and frame rate spikes
Fixed an end of game hang
Better smoothing of predicted positions and orientations

Allow more maps specified from dedicated server command line
Better Droideka prediction
Added remote admin support for those hosting dedicated servers
Tighter clock synchronization under normal conditions
Fixed joining servers behind most firewalls
Allow more mod maps (was 50, now 512)

Global

Fixed CIS Pilot shooting backwards
[/spoiler]
Title: Re: Unit Limit in Locals?
Post by: Snake on April 06, 2013, 06:36:04 AM
Maybe we could make a petition to someone who might have this.. :P
Title: Re: Unit Limit in Locals?
Post by: RepComm on April 06, 2013, 08:53:36 AM
Sooo, that can't be done via Hex editing and takes source code editing? Or is it just extremely to complex for you to simple "cut" off the need for CD key?
Title: Re: Unit Limit in Locals?
Post by: Led on April 06, 2013, 09:56:40 AM
Quote from: -RepublicCommando- on April 06, 2013, 08:53:36 AM
Sooo, that can't be done via Hex editing and takes source code editing? Or is it just extremely to complex for you to simple "cut" off the need for CD key?

no-cd is possible for those that understand hex editing and assembly language very well.  Cheat engine might even help.  It is very advanced though, and would violate the EULA, but worth a shot.

Title: Re: Unit Limit in Locals?
Post by: Dark_Phantom on April 06, 2013, 03:40:17 PM
Those .lua scripts were nice to have an opportunity to try to reconstruct, as I now understand .lua much better than I did before.  I had almost all the Galactic Conquest scripts and missionlist and other scripts redone, but as far as getting all scripts done would have been next to impossible.  I stared at some of the common scripts for hours and tried and tried to get them to work, all with crashes.
Maybe we should hire a professional programmer to help us with editing the executable.
Also, nobody mentioned "Hey, we could get the PS2 spawn screen in PC with source code!"
Title: Re: Unit Limit in Locals?
Post by: Snake on April 06, 2013, 05:58:38 PM
Well I just tried putting 10 locals in and it crashed the scriptmunge, so I took 5 out and it still crashed, so I took the dc: off of the locals and it still crashed. I <3 SWBF Logic.
Title: Re: Unit Limit in Locals?
Post by: SleepKiller on April 06, 2013, 06:06:08 PM
In the console window it should be saying what line it is crashing on. Check it for syntax errors.
Title: Re: Unit Limit in Locals?
Post by: Snake on April 07, 2013, 10:38:09 AM
Dear God.. I'm so sick of swbf. Well scriptmunge doesnt crash anymore but the map crashes because of:

Message Severity: 3
.\source\Team.cpp(171)
Team  has no unit classes

Wtc does that even mean? Both teams have unit classes. Here's .lua. (Note: all of this was working before added locals.
[spoiler]--start header
function ScriptInit()
local ALL = 1
local IMP = 2
local ATT = 1
local DEF = 2
--end header
--start objectives
AddMissionObjective(IMP,"red", "level.tatup3.objectives.1");
AddMissionObjective(IMP,"orange", "level.tatup3.objectives.2");
AddMissionObjective(IMP,"orange", "level.tatup3.objectives.3");
AddMissionObjective(ALL,"red", "level.tatup3.objectives.1");
AddMissionObjective(ALL,"orange", "level.tatup3.objectives.2");
AddMissionObjective(ALL,"orange","level.tatup3.objectives.3");
--end objectives
--start soundlvl
ReadDataFile("sound\\tat.lvl;tat1gcw");
--end soundlvl

-- Start sidelvls
ReadDataFile("dc:SIDE\\all.lvl",
"all_inf_blah",
"all_inf_blah",
"all_inf_blah",
"all_inf_blah",
"all_inf_blah",
"all_inf_lukeskywalker",
"all_inf_smuggler");
ReadDataFile("SIDE\\imp.lvl",
"imp_inf_basic_tie",
"imp_inf_darthvader",
"imp_inf_dark_trooper");
--end sidelvls
--start loadouts
SetTeamName(ALL, "Alliance")
SetTeamIcon(ALL, "all_icon")
AddUnitClass(ALL, "all_inf_blah",7)
AddUnitClass(ALL, "all_inf_blah",6)
AddUnitClass(ALL, "all_inf_blah",6)
AddUnitClass(ALL, "all_inf_blah",7)
AddUnitClass(ALL, "all_inf_blah",3)
SetHeroClass(ALL, "all_inf_lukeskywalker")
SetTeamName(IMP, "Empire")
SetTeamIcon(IMP, "imp_icon")
AddUnitClass(IMP, "imp_inf_storm_trooper",10)
AddUnitClass(IMP, "imp_inf_shock_trooper",4)
AddUnitClass(IMP, "imp_inf_pilottie",5)
AddUnitClass(IMP, "imp_inf_scout_trooper",6)
AddUnitClass(IMP, "imp_inf_dark_trooper",4)
SetHeroClass(IMP, "imp_inf_darthvader")

SetUnitCount(3, 30)
--end loadouts
--start teamstats
SetUnitCount(ATT, 29)
SetReinforcementCount(ATT, 550)
SetUnitCount(DEF, 29)
SetReinforcementCount(DEF, 230)
--end teamstats
--start alliances
SetTeamAsFriend(ATT, 1)
SetTeamAsEnemy(ATT, 2)
SetTeamAsFriend(DEF, 2)
SetTeamAsEnemy(DEF, 1)
SetAttackingTeam(ATT);
--end alliances

--start memorypools
ClearWalkers()
AddWalkerType(0, 0)-- special -> droidekas
AddWalkerType(1, 0)-- 1x2 (1 pair of legs)
AddWalkerType(2, 0)-- 2x2 (2 pairs of legs)
AddWalkerType(3, 0)-- 3x2 (3 pairs of legs)
SetMemoryPoolSize("PowerupItem", 60)
SetMemoryPoolSize("EntityMine", 40)
--end memorypools
--start worldlvl
ReadDataFile("dc:tatup3\\tatup3.lvl")
--end worldlvl
--start spawndelay
SetSpawnDelay(5.0, 0.25)
--end spawndelay
--start flyheight
--end flyheight
--start ainotify
--end ainotify
--start stayinturrets
--end stayinturrets
--start denseenvironment
SetDenseEnvironment("true")
--end denseenvironment
--start birdsandfish
--end birdsandfish
--start deathregions
--end deathregions

--start soundconfig
OpenAudioStream("sound\\tat.lvl","tatgcw_music");
OpenAudioStream("sound\\tat.lvl","tat1");
OpenAudioStream("sound\\tat.lvl","tat1");
OpenAudioStream("sound\\gcw.lvl","gcw_vo");
OpenAudioStream("sound\\gcw.lvl","gcw_tac_vo");
OpenAudioStream("sound\\tat.lvl","tat1_emt");
SetBleedingVoiceOver(ALL,ALL,"all_off_com_report_us_overwhelmed",1);
SetBleedingVoiceOver(ALL,IMP,"all_off_com_report_enemy_losing",1);
SetBleedingVoiceOver(IMP,ALL,"imp_off_com_report_enemy_losing",1);
SetBleedingVoiceOver(IMP,IMP,"imp_off_com_report_us_overwhelmed",1);
SetLowReinforcementsVoiceOver(ALL, ALL, "all_off_defeat_im", .1,1);
SetLowReinforcementsVoiceOver(ALL, IMP, "all_off_victory_im", .1,1);
SetLowReinforcementsVoiceOver(IMP, IMP, "imp_off_defeat_im", .1,1);
SetLowReinforcementsVoiceOver(IMP, ALL, "imp_off_victory_im", .1,1);
SetOutOfBoundsVoiceOver(2,"Allleaving");
SetOutOfBoundsVoiceOver(1,"Impleaving");
SetAmbientMusic(ALL,1.0,"all_tat_amb_start",0,1);
SetAmbientMusic(ALL,0.99,"all_tat_amb_middle",1,1);
SetAmbientMusic(ALL,0.1,"all_tat_amb_end",2,1);
SetAmbientMusic(IMP,1.0,"imp_tat_amb_start",0,1);
SetAmbientMusic(IMP,0.99,"imp_tat_amb_middle",1,1);
SetAmbientMusic(IMP,0.1,"imp_tat_amb_end",2,1);
SetVictoryMusic(ALL,"all_tat_amb_victory");
SetDefeatMusic (ALL,"all_tat_amb_defeat");
SetVictoryMusic(IMP,"imp_tat_amb_victory");
SetDefeatMusic (IMP,"imp_tat_amb_defeat");
SetSoundEffect("ScopeDisplayZoomIn","binocularzoomin");
SetSoundEffect("ScopeDisplayZoomOut","binocularzoomout");
SetSoundEffect("SpawnDisplayUnitChange","shell_select_unit");
SetSoundEffect("SpawnDisplayUnitAccept","shell_menu_enter");
SetSoundEffect("SpawnDisplaySpawnPointChange","shell_select_change");
SetSoundEffect("SpawnDisplaySpawnPointAccept","shell_menu_enter");
SetSoundEffect("SpawnDisplayBack","shell_menu_exit");
SetPlanetaryBonusVoiceOver(IMP,IMP,0,"imp_bonus_imp_medical");
SetPlanetaryBonusVoiceOver(IMP,ALL,0,"imp_bonus_all_medical");
SetPlanetaryBonusVoiceOver(IMP,IMP,1,"");
SetPlanetaryBonusVoiceOver(IMP,ALL,1,"");
SetPlanetaryBonusVoiceOver(IMP,IMP,2,"imp_bonus_imp_sensors");
SetPlanetaryBonusVoiceOver(IMP,ALL,2,"imp_bonus_all_sensors");
SetPlanetaryBonusVoiceOver(IMP,IMP,3,"imp_bonus_imp_hero");
SetPlanetaryBonusVoiceOver(IMP,ALL,3,"imp_bonus_all_hero");
SetPlanetaryBonusVoiceOver(IMP,IMP,4,"imp_bonus_imp_reserves");
SetPlanetaryBonusVoiceOver(IMP,ALL,4,"imp_bonus_all_reserves");
SetPlanetaryBonusVoiceOver(IMP,IMP,5,"imp_bonus_imp_sabotage");--sabotage
SetPlanetaryBonusVoiceOver(IMP,ALL,5,"imp_bonus_all_sabotage");
SetPlanetaryBonusVoiceOver(IMP,IMP,6,"");
SetPlanetaryBonusVoiceOver(IMP,ALL,6,"");
SetPlanetaryBonusVoiceOver(IMP,IMP,7,"imp_bonus_imp_training");--advanced training
SetPlanetaryBonusVoiceOver(IMP,ALL,7,"imp_bonus_all_training");--advanced training
SetPlanetaryBonusVoiceOver(ALL,ALL,0,"all_bonus_all_medical");
SetPlanetaryBonusVoiceOver(ALL,IMP,0,"all_bonus_imp_medical");
SetPlanetaryBonusVoiceOver(ALL,ALL,1,"");
SetPlanetaryBonusVoiceOver(ALL,IMP,1,"");
SetPlanetaryBonusVoiceOver(ALL,ALL,2,"all_bonus_all_sensors");
SetPlanetaryBonusVoiceOver(ALL,IMP,2,"all_bonus_imp_sensors");
SetPlanetaryBonusVoiceOver(ALL,ALL,3,"all_bonus_all_hero");
SetPlanetaryBonusVoiceOver(ALL,IMP,3,"all_bonus_imp_hero");
SetPlanetaryBonusVoiceOver(ALL,ALL,4,"all_bonus_all_reserves");
SetPlanetaryBonusVoiceOver(ALL,IMP,4,"all_bonus_imp_reserves");
SetPlanetaryBonusVoiceOver(ALL,ALL,5,"all_bonus_all_sabotage");--sabotage
SetPlanetaryBonusVoiceOver(ALL,IMP,5,"all_bonus_imp_sabotage");
SetPlanetaryBonusVoiceOver(ALL,ALL,6,"");
SetPlanetaryBonusVoiceOver(ALL,IMP,6,"");
SetPlanetaryBonusVoiceOver(ALL,ALL,7,"all_bonus_all_training");--advanced training
SetPlanetaryBonusVoiceOver(ALL,IMP,7,"all_bonus_imp_training");--advanced training
--end soundconfig

--start activebonus
--end activebonus

--start camerashots
AddCameraShot(-0.404895, 0.000992, -0.914360, -0.002240, -85.539894, 20.536297, 141.699493);
AddCameraShot(0.040922, 0.004049, -0.994299, 0.098381, -139.729523, 17.546598, -34.360893);
AddCameraShot(-0.312360, 0.016223, -0.948547, -0.049263, -217.381485, 20.150953, 54.514324);
--end camerashots

--start footer
end
--end footer



[/spoiler]

"blah" is inserted for the names of my units that may give clues to my next project.  :P (Yes, I still have a few more ideas before retirement.)
Title: Re: Unit Limit in Locals?
Post by: Led on April 07, 2013, 10:45:25 AM
You need something like:

AddUnitClass(3, "imp_inf_storm_trooper",10)


or you need to get rid of the line that says SetUnitCount (3,30) or whatever it says, I didn't paste it.
Title: Re: Unit Limit in Locals?
Post by: Snake on April 07, 2013, 10:47:26 AM
Ah, I saw it right after i posted. Now, time to retry with the locals..
EhPortal 1.34 © 2024, WebDev