Battlefront 1 map sides

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

Moderator: Moderators

Post Reply
Trinidad

Battlefront 1 map sides

Post by Trinidad »

I am trying to add a unit to my map side without importing the entire side. I'm not sure what is wrong but here's all the info.

LOG:

Code: Select all

Opened logfile BFront.log  2007-05-23 0747

Message Severity: 2
D:\src\FRONTLINE_PC\RedEngineFL\movie\RedMovie.cpp(467)
Segment 0x4adaf069 does not exist in movie 0xb86e8e36

Message Severity: 2
D:\src\FRONTLINE_PC\FrontLine\Source\GameModel.cpp(254)
Duplicate model name exists in another level file: 302d0a57

Message Severity: 2
D:\src\FRONTLINE_PC\FrontLine\Source\Team.cpp(531)
Team missing class "imp_inf_heavy_trooper" (check the side's .req file)

.LUA

Code: Select all

---------------------------------------------------------------------------
-- FUNCTION:    ScriptInit
-- PURPOSE:     This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES:       The name, 'ScriptInit' is a chosen convention, and each
--              mission script must contain a version of this function, as
--              it is called from C to start the mission.
---------------------------------------------------------------------------

function ScriptInit()
--  Empire Attacking (attacker is always #1)
    local ALL = 1
    local IMP = 2
--  These variables do not change
    local ATT = 1
    local DEF = 2

    AddMissionObjective(IMP, "red", "level.Bes9.objectives.1");
    AddMissionObjective(IMP, "orange", "level.Bes9.objectives.2");
    AddMissionObjective(IMP, "orange", "level.Bes9.objectives.3");
    AddMissionObjective(ALL, "red", "level.Bes9.objectives.1");
    AddMissionObjective(ALL, "orange", "level.Bes9.objectives.2");
    AddMissionObjective(ALL, "orange", "level.Bes9.objectives.3");
    

    ReadDataFile("sound\\tat.lvl;tat1gcw")
    ReadDataFile("SIDE\\all.lvl",
        "all_inf_basicdesert",
    "all_inf_lukeskywalker",
        "all_inf_smuggler");

    ReadDataFile("SIDE\\imp.lvl",
        "imp_inf_basic_tie",
    "imp_inf_darthvader",
        "imp_inf_dark_trooper");
    ReadDataFile("dc:SIDE\\heavytrooper.lvl",
        "imp_inf_heavy_trooper");

    SetAttackingTeam(ATT);

--      Alliance Stats
    SetTeamName(ALL, "Alliance")
    SetTeamIcon(ALL, "all_icon")
    AddUnitClass(ALL, "all_inf_soldierdesert",7)
    AddUnitClass(ALL, "all_inf_vanguard",4)
    AddUnitClass(ALL, "all_inf_pilot",2)
    AddUnitClass(ALL, "all_inf_marksman",2)
    AddUnitClass(ALL, "all_inf_smuggler",1)
    SetHeroClass(ALL, "all_inf_lukeskywalker")

--      Imperial Stats
    SetTeamName(IMP, "Empire")
    SetTeamIcon(IMP, "imp_icon")
    AddUnitClass(IMP, "imp_inf_storm_trooper",7)
    AddUnitClass(IMP, "imp_inf_shock_trooper",3)
    AddUnitClass(IMP, "imp_inf_pilottie",2)
    AddUnitClass(IMP, "imp_inf_scout_trooper",2)
    AddUnitClass(IMP, "imp_inf_heavy_trooper",2)
    SetHeroClass(IMP, "imp_inf_darthvader")
    
--  Attacker Stats
    SetUnitCount(ATT, 16)
    SetReinforcementCount(ATT, 200)
--    AddBleedThreshold(ATT, 31, 0.0)
--    AddBleedThreshold(ATT, 21, 0.75)
    AddBleedThreshold(ATT, 11, 0.75)
    AddBleedThreshold(ATT, 10, 1.5)
    AddBleedThreshold(ATT, 1, 3.0)

--  Defender Stats
    SetUnitCount(DEF, 16)
    SetReinforcementCount(DEF, 200)
--    AddBleedThreshold(DEF, 31, 0.0)
--    AddBleedThreshold(DEF, 21, 0.75)
    AddBleedThreshold(DEF, 11, 0.75)
    AddBleedThreshold(DEF, 10, 1.5)
    AddBleedThreshold(DEF, 1, 3.0)

--  Local Stats
--   SetTeamName(3, "locals")
--   AddUnitClass(3, "gam_inf_gamorreanguard",3)
--   SetUnitCount(3, 3)
--   SetTeamAsEnemy(3, ATT)
--   SetTeamAsEnemy(3, DEF)

--  Level Stats
    ClearWalkers()
    AddWalkerType(0, 0)
   -- AddWalkerType(1, 4)
    AddWalkerType(2, 0)
    --SetMemoryPoolSize("EntityHover", 12)
    --SetMemoryPoolSize("EntityFlyer", 5)
--  SetMemoryPoolSize("EntityBuildingArmedDynamic", 16)
--  SetMemoryPoolSize("EntityTauntaun", 0)
--  SetMemoryPoolSize("MountedTurret", 22)
    SetMemoryPoolSize("PowerupItem", 60)
--    SetMemoryPoolSize("SoundSpaceRegion", 85)
    SetMemoryPoolSize("EntityMine", 40)
    --SetMemoryPoolSize("Aimer", 200)
--    SetMemoryPoolSize("Obstacle", 725)
    --SetMemoryPoolSize("EntityLight", 150)
    SetSpawnDelay(10.0, 0.25)
    ReadDataFile("dc:Bes9\\Bes9.lvl")
    SetDenseEnvironment("false")
    --AddDeathRegion("Sarlac01")
  --  SetMaxFlyHeight(90)
  --  SetMaxPlayerFlyHeight(90)


--  Sound Stats
    OpenAudioStream("sound\\tat.lvl",  "tatgcw_music");
   -- OpenAudioStream("dc:sound\\mod.lvl",  "Bes9");
   -- OpenAudioStream("dc:sound\\mod.lvl",  "Bes9");
    OpenAudioStream("sound\\gcw.lvl",  "gcw_vo");
    OpenAudioStream("sound\\gcw.lvl",  "gcw_tac_vo");
   --  OpenAudioStream("dc:sound\\mod.lvl",  "Bes9_emt");
   --OpenAudioStream("dc:sound\\tat.lvl",  "tat3_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("WeaponUnableSelect",  "com_weap_inf_weaponchange_null");
    --SetSoundEffect("WeaponModeUnableSelect",  "com_weap_inf_modechange_null");
    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


--  Camera Stats
--Tat 3 - Jabbas' Palace
    AddCameraShot(0.685601, -0.253606, -0.639994, -0.236735, -65.939224, -0.176558, 127.400444);
    AddCameraShot(0.786944, 0.050288, -0.613719, 0.039218, -80.626396, 1.175180, 133.205551);
    AddCameraShot(0.997982, 0.061865, -0.014249, 0.000883, -65.227898, 1.322798, 123.976990);
    AddCameraShot(-0.367869, -0.027819, -0.926815, 0.070087, -19.548307, -5.736280, 163.360519);
    AddCameraShot(0.773980, -0.100127, -0.620077, -0.080217, -61.123989, -0.629283, 176.066025);
    AddCameraShot(0.978189, 0.012077, 0.207350, -0.002560, -88.388947, 5.674968, 153.745255);
    AddCameraShot(-0.144606, -0.010301, -0.986935, 0.070304, -106.872772, 2.066469, 102.783096);
    AddCameraShot(0.926756, -0.228578, -0.289446, -0.071390, -60.819584, -2.117482, 96.400620);
    AddCameraShot(0.873080, 0.134285, 0.463274, -0.071254, -52.071609, -8.430746, 67.122437);
    AddCameraShot(0.773398, -0.022789, -0.633236, -0.018659, -32.738083, -7.379394, 81.508003);
    AddCameraShot(0.090190, 0.005601, -0.993994, 0.061733, -15.379695, -9.939115, 72.110054);
    AddCameraShot(0.971737, -0.118739, -0.202524, -0.024747, -16.591295, -1.371236, 147.933029);
    AddCameraShot(0.894918, 0.098682, -0.432560, 0.047698, -20.577391, -10.683214, 128.752563);

end
SIDE .REQ

Code: Select all

ucft
{
    REQN
    {
        "lvl"
        "imp_inf_heavy_trooper"
    }
UNIT .REQ

Code: Select all

imp_inf_heavy_trooper.req

ucft
{
    REQN
    {
        "class"
        "imp_inf_heavy_trooper"
    }

}




Any help is appreciated: I have read almost all the tutorials I could find, but with no avail. I also looked at Psycho's Chain Isle map.

Thanks,
Trinidad
User avatar
Laserblast
Second Lance Corporal
Second Lance Corporal
Posts: 105
Joined: Sat Sep 17, 2005 12:25 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Post by Laserblast »

The first thing that comes to mind is checking to make sure that it actually munged. For this check the lvl_pc sides folder for the map. The rest looks correct, but I will look through it again...


On second thought: The duplicate model might indicate that it is reading it (or you are loading a model already being used twice). Other than that, the first .REQ is missing a bracket.

It would probably be better to shift the sides name and the odf/req name to different things, but the error seems to indicate the problem is coming from the .REQ instead of an ODF error (those often crash the game :(). Wish I could give a more definitive answer, but those are my best guesses off hand.
Trinidad

Post by Trinidad »

1. I checked and it did munge. Good idea, though.

2. I added a bracket, didn't work. I think that the model use is the problem. Does anyone know any fixes?

Thank-you so much for your help- It means the world to me. But I'm still looking for responses from others.

Once again,
Thanks
User avatar
Laserblast
Second Lance Corporal
Second Lance Corporal
Posts: 105
Joined: Sat Sep 17, 2005 12:25 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Post by Laserblast »

A question responded to with a question, but why is there a imp_inf_heavy_trooper.req at the top of the unit .req? Is it a typo from posting or is there a reason to put that in a req file that I am not aware of? The unit reqs from the Assets folder don't seem to have any similar lines...

I am rather dry on ideas. Hopefully, someone else will jump in with fresh ideas...
Alpha

Post by Alpha »

Does BF1 support custom sides with more than three-letter names? I don't remember if it does or not. If it doesn't, then that is your issue there. And your log does seem to suggest it is a problem with the model, as well, not as much your documentation.
rebel_scum

Post by rebel_scum »

It does, i remember on my first map which was over 3 years ago, that i had a loong side name :P
Trinidad

Post by Trinidad »

Is there some sort of guide to the BFlog? Or is there no exact answer to what is wrong? Maybe Psycho knows?

I still have to try changing the model, but I'm not sure what different model to use. I tried renaming it, so I'll be using a clone model next.

Thanks for your help,
Trinidad

Edit: I got my unit in-game! Now I just need to find out how to localize it.
User avatar
Laserblast
Second Lance Corporal
Second Lance Corporal
Posts: 105
Joined: Sat Sep 17, 2005 12:25 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Post by Laserblast »

For localizing, bring up the bfbuilder and open whatever project it is for. Then go to localize (that far is rather simple). I believe the heavy trooper should go under the entities section. However, since the original files are subdivided by the sides (similar to the weapons section that you will find, which I believe is already in there), I am not sure as to whether you need to divide it as such. You might get away with just a key under entities for it.

Just out of curiousity, what was the problem that was causing the error? I have had duplicate model names in different levels without causing errors before, so it would be interesting if that was indeed the cause.
Trinidad

Post by Trinidad »

Thanks to the tutorials, I got my sides localized. :D Thanks for your help, laser. The problem went away as soon as I switched the model to a different guy, (clone pilot) and I haven't tried using the shocktrooper model again. I'm still confused as to what the problem was.
Post Reply