Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Ty294

#76
Requests / Re: Hex-editing model addons?
May 28, 2020, 08:56:32 PM
This is another possible method of doing what you are requesting:

http://www.swbfgamers.com/index.php?topic=4752.0

It's a bit complicated of a method, but it works. The download for the tools linked in said thread is currently down, though. I had to contact Tripider directly to get them, and though he said he'd update the thread, it doesn't appear as though he has done so yet.
#77
Quote from: Dark_Phantom on May 21, 2020, 12:48:56 PM

  • I'm not sure how vehicle initialization will work for team 3/4/5/6/7 if they are one of the 4 main factions

As wsa30h pointed out to me, you would need to create a custom vehicle spawner with just the faction name "empire", "CIS", "all" etc but without the "ATK" or "DEF". I have not tested it yet, but it stands to reason you should be able to likewise add a "neu" or "neutral" designation to spawn vehicles for the neutral team.

I'd have to do some testing to determine if it is possible to separate multiple teams using the same faction.

Quote from: Dark_Phantom on May 21, 2020, 12:48:56 PM

  • Much of the VO stuff is hard-coded to ATT/DEF_Teamname, so if team 3 or 4 is the same team name, I'm not sure you can work around that.

That would seem to confirm what I suspect. I don't think that would be a huge issue for most maps, unless someone was attempting to create a "civil war" type map where two of the same faction were fighting each-other (like what LED mentioned). In which case maybe just removing the VO would be plausible, or replacing it with a custom one that is more generic "a command post has been lost" instead of "we are losing a command post".

Quote from: Dark_Phantom on May 21, 2020, 12:48:56 PM

  • There is a max of 8 teams.  Teams 0-7, however team 0 is inaccessible (though you can successfully assign units to it). My uneducated reasoning says that is only there for a truly neutral cp (which is assigned to team 0), and therefore cannot support spawning. This may be related to the neu/neutral crash.

Possibly. But while team 0 can't spawn, the neu/neutral faction can (as long as it is designated for teams 1-7), so there is some separation between the two in some way.

I tend to suspect that whatever element is missing that prevents it from being localized is also related to the crash. Something that fails to validate it as a full faction, thus not giving it whatever line of code is necessary to give it a name in the localization, and maybe that failure to pull in the name is also why the stats screen cannot handle it.
#78
Quote from: Led on May 21, 2020, 02:52:01 PM
I think it was just on the CP.

Gotcha. Well, seeing as that is the best I can do, I will use that method.

Thanks again to everyone!
#79
Hey all, so in the process of experimenting in the LUA in a (vain) effort to try and have icon-less factions, I discovered something that I'm not entirely sure other people know of or not. I could be wrong, and this could be something that has been common knowledge for years and I just haven't seen it yet (I tried searching and checking through the tutorial guide and didn't see anything on the matter though), so if you guys know this all, just stop reading and tell me to shut up. lol

So, I found myself interested in the information provided by this post by Dark_Phantom, namely the existence of a "neutral" faction. I began doing some experimenting, and discovered a few interesting things that could and should be useful to people (at the least, to myself, if everyone else already knows these things).

Multiple Mainline Teams

As indicated in Phantom's post, the factions listed in the hardcode are the only ones the game recognizes, anything else defaults to the "local" (yellow) faction. In addition, although you have separate listings of "all" and "alliance", "rep" and "republic", "imp" and "empire", these two variants function interchangeably and don't appear to be separate in any way. Therefor, in effect, there are six "factions" as defined by the game:


  • All/Alliance
  • CIS
  • Imp/Empire
  • Rep/Republic
  • Locals
  • Neu/Neutral

Now we all know that you can have multiple local factions, and we further know that you can set teams 3, 4, 5 etc as being one of the off-era mainline factions. But I found it is also entirely possible to use a mainline faction multiple times. For example, let's say you wanted three different clone trooper legions fighting against the seps. You could set your teams 3 and 4 to both pull "Republic" instead of local:

--      2nd Legion Stats
    SetTeamName(3, "republic")
    SetTeamIcon(3, "rep_icon")
    AddUnitClass(3, "rep_inf_clone_trooper",10)
    AddUnitClass(3, "rep_inf_arc_trooper",1)
    AddUnitClass(3, "rep_inf_clone_pilot",2)
    AddUnitClass(3, "rep_inf_clone_sharpshooter",2)
    AddUnitClass(3, "rep_inf_jet_trooper",1)
--    SetHeroClass(3, "rep_inf_macewindu")
    SetUnitCount(3, 16)
    SetTeamAsEnemy(3, ATT)
    SetTeamAsFriend(3, DEF)
     

--      3rd Legion Stats
    SetTeamName(4, "republic")
    SetTeamIcon(4, "rep_icon")
    AddUnitClass(4, "rep_inf_clone_trooper",10)
    AddUnitClass(4, "rep_inf_arc_trooper",1)
    AddUnitClass(4, "rep_inf_clone_pilot",2)
    AddUnitClass(4, "rep_inf_clone_sharpshooter",2)
    AddUnitClass(4, "rep_inf_jet_trooper",1)
--    SetHeroClass(4, "rep_inf_macewindu")
    SetUnitCount(4, 16)
    SetTeamAsEnemy(4, ATT)
    SetTeamAsFriend(4, DEF)


NOTE: This does mean if you give teams 3 and 4 their own CPs, they will wind up "capturing" them for main republic faction (DEF in this case) since their designation as "friend" of DEF makes them subservient. There are ways around that of course, such as untakable CPs, invisible ones, or just attaching them to the same CPs as the main republic faction.

Anyway, back to the main point...

The SetTeamName(4, "republic") line is the key. You could actually take one of the main two factions and simply swap out the name in the quotations to any other faction, regardless of what is before it, and it will load the faction in the quotations. For example:

--      Alliance Stats
    SetTeamName(ALL, "Alliance")
    SetTeamIcon(ALL, "all_icon")
    AddUnitClass(ALL, "all_inf_soldierdesert",10)
    AddUnitClass(ALL, "all_inf_vanguard",1)
    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, "Alliance")
    SetTeamIcon(IMP, "imp_icon")
    AddUnitClass(IMP, "imp_inf_storm_trooper",10)
    AddUnitClass(IMP, "imp_inf_shock_trooper",1)
    AddUnitClass(IMP, "imp_inf_pilottie",2)
    AddUnitClass(IMP, "imp_inf_scout_trooper",2)
    AddUnitClass(IMP, "imp_inf_dark_trooper",1)
    SetHeroClass(IMP, "imp_inf_darthvader")


Despite the fact that the imperial side has "imp," before the word "Alliance", it will load in as a rebel faction, with the rebel logo and rebel localization (and VO). In this particular case, the "imp" is really just the designation that the LUA has been given. You could take that same faction and replace every line of "IMP," with "WOK" and it would function the same, provided you changed the line at the top to reflect it:

    local ALL = 1
    local WOK = 2


You'd also need to replace IMP in the VO's below for them to work right. That's really more if you're into neatness though, you could simply leave everything as IMP, but all you really have to do is replace "Empire" with "Alliance" or "All" in the quotations slot, and it will change the nature of the faction.

Regardless, this is a nice way to supplement one of the main factions with additional soldiers that are localized the same way as that faction. I can see it being used similarly to how Sereja usually has extras like Imperial probe and torture droids, or Rebel R2 units, following alongside the main faction. In his case, they are locals, but this is a way you can define them as being rebel or imperial, so when they are killed they will use those factions' localization instead.

There is one potential shortcoming, a minor one, but still one that is annoying to perfectionists like me. So, say we have our three Republic factions, if one of the non-player ones loses a CP, it will be reported to the player by the announcer as though it was their faction losing the CP. This applies whether those republic factions are friendly, neutral or hostile toward the player's faction; it will simply happen regardless. In effect, the Republic VO will apply to any Republic faction for any Republic Faction's action. I have not attempted to test messing around with the announcer lines in the LUA though, so it is maybe possible to override this somehow, but for the moment I'm going to assume it's bound to the hard-coded faction and not the LUA-defined "side".

The Neutral Side

Now, as I said above, there are 6 factions you can call upon. Neutral, or Neu, as it turns out, is a viable faction that is mostly functional in-game. It does not have an icon (which is where I briefly had high-hopes that it could be used as a non-local alternative to the mainline factions) and behaves similarly to the four mainlines (green for player/allies, red for enemies, white if neutral). It can in fact be loaded in as the player faction as well. It is also partially supported by localization, meaning you can go in and under "common>sides>neu>firstnames/lastnames" you can set names for the soldiers serving for this faction. By default, they are unlocalized, and thus have Imperial Stormtrooper-style designations (two letters and three numbers). Because they are unlocalized though, you to override them with as many or as few designations as you want.

However, the neutral faction has two major weaknesses. The first is, as I implied, the localization is only partial. I cannot get it to accept a faction name, even if I set it up the same way as every other faction. It will always show up in-game as "undefined". The other problem is that, if it is loaded as one of the playable factions, it will run just fine throughout a match, but once the match ends and attempts to go to the stats page, the game will crash. There is no crash risk if it is team 3, 4, 5 etc. But it will crash if it is team 1 or 2.

In essence, the "neutral" or "neu" faction can be used as an "extra" local faction, but primarily as one that does not capture or hold and CPs for itself (unless someone can figure out what is missing on the localization front). It can be used, much like the doubled-up mainline factions as I outlined above, as a supplemental side that spawns via invisible/untakable CPs, or alongside one of the main sides. I can see it as being potentially quite useful in that capacity.




Well, that's what I got. Hopefully I explained it cohesively enough for people to understand. If you guys know all this already, then I'm sorry for wasting your time, and even more for wasting my own! :XD: But if this is something that hasn't really gotten any attention, I hope it can be of use to someone!
#80
Quote from: Led on May 20, 2020, 02:27:48 PM
I have seen maps with custom holograms.

Did they include in the unit selection screen?

I know it is possible to use custom holos if you make your own controlzone/commandpost .odfs to use on your map. You can just override what meshes are loaded in.

If you've seen versions with custom icons even for the unit selection screen though, I'd love to know which maps they were so I can try to search out assets or reach out to the modders who made them if possible.
#81
Quote from: Dark_Phantom on May 20, 2020, 12:23:42 PM
Pretty much. Interesting that the fx and tgas aren't working still though.  Animations can also be changed, as you can see from Sereja's common mod, but the msh files are most likely never going to work using this method.

If you use a common.lvl generated from my version of the tool, does it seem to work correctly?

Not for pulling it into the addon map, no. It's the same result as the version generated with the Battlebelk version; it works when replacing the main common, but just won't load into mod map.

It would be nice to get it working, but as I indicated, the main reason I wanted it was to attempt to replace/remove the icons for each faction, which apparently I cannot do. So, it is not that big a priority anymore I'm afraid. lol

On a positive note, I tested something completely unrelated, and while it also won't solve my problem, it does present a potentially intriguing discovery (assuming other people have not already discovered it, which is possible, I've clearly missed a lot in eight+ years). But that's another matter.

I appreciate the help, in any case. Guess I'll just have to deal with the fact that two non-mainline factions are gonna have mainline faction logos in the selection page. Oh well! lol
#82
Quote from: Dark_Phantom on May 20, 2020, 08:17:06 AM
fx and .tga files should replace correctly I believe.
However, you can't override msh and odf using a custom common.  This could be enough to cause a crash but I didn't think it would.

Edit: I guess I should explain:
fx and textures seem to be more flexible and allowed to be loaded in at any trigger.  Take for example the sky changer - which overwrites the sky (usually just through a tga).  However, classes (odf) and geometries (msh) really do not take kindly to being switched out. As in, if you try to replace a class on the spawn screen using the sky changer method or swap in a new geometry for a field object like a pillar, I am pretty sure the game crashes (and if it doesn't it does nothing, it's been a while).  The common.lvl load in falls along the same theory - if you try to replace a static class that has already been called into the map, it will crash.  If it is the same, I think it just ignores it or it loads it again but since there isn't a difference it doesn't crash. This is just the way that the game engine handles these things.

Ah, I see.

I attempted it again with only FX/TGAs and still got no results though, so I have to imagine I'm doing something else wrong.

HOWEVER, that is largely irrelevant now I would think, since my primary goal was to replace the faction icons. If what you are saying is correct, then am I correct in assuming they cannot be overridden on an per-addon-map basis at all? Essentially the only way to replace them is via the base game common, which of course you don't want to really have to mess with if it's just for an addon map.
#83
Quote from: Led on May 19, 2020, 05:35:55 PM
Suggest you use full mod tools, understand what all is in the stock common.  Use all stock common items, add new items one at a time, check your req files. 

Check for crash/no crash after each change.
Quote from: Dark_Phantom on May 19, 2020, 09:14:58 PM
The structure of that tool is that you replace stuff in custom, like scripts (I mean, you could replace Data, but think of that as like your backup).
Listen to Led - work through it slowly, don't go replacing many things at once so hopefully the problem can be found.

Again, appreciate your guys help and sorry if I'm straining your patience; this issue gets more and more baffling for me.

So, for one, I have not had a crashing issue at all. The problem is merely that it won't affect anything in the mod map. But as I have established (and tested again to be sure and confirm), Sereja's common will load into my mod map, so my LUA must be correct.

However, if I try to do the same thing with loading my common into the mod map, nothing happens.

But at the same time, I have replaced the base game common.lvl with my common, and have attempted it with a few smaller versions, and it works every time in that circumstance.

So, I just tried another experiment... I replaced the base common.lvl with my common.

D:\SteamLibrary\steamapps\common\Star Wars Battlefront (Classic 2004)\GameData\Data\_LVL_PC\Common\ENG\common.lvl

And took the original common.lvl and put it in my mod map directory.

D:\SteamLibrary\steamapps\common\Star Wars Battlefront (Classic 2004)\GameData\AddOn\SepV\Data\_lvl_pc\COMMON\common.lvl

And it also does not work!

This leads me to suspect that there must be something specific and special in Sereja's common.lvl that gets it to load into the map...

That, or he did not attempt to override any of the interface/msh/odf items in common and just did the pistol animation. Truth be told I don't know the full extent of what his common affects other than the pistol animation...

My attempted changes have been:

Effects:

Replace headshot.fx, lightsabre_deflect.fx, lightsabre_hit.fx, ord_explosion.fx
Add com_sfx_laser_orange.tga, com_sfx_smoke3.tga (to provide textures to new ord_explosion.fx)

Interface:

Replace all_icon.tga, cis_icon.tga, HUD_all_icon.tga, HUD_cis_icon.tga

MSH:

Replace com_icon_alliance.msh, com_icon_CIS.msh

ODF:

Replace com_bldg_controlzone.odf


Again, all changes work if I put the common.lvl directly into the base game, they just won't override if I attempt to load them into a mod map. And likewise, the regular common won't override this changes if I reverse their places.

I'm going to message Sereja on the matter, though I'm not sure how soon I'll get a reply since it appears he's been away a while.
#84
Quote from: Dark_Phantom on May 19, 2020, 11:56:56 AM
I am pretty sure he uses the common.lvl builder that this site uses, I don't know if you are using anything different:
http://www.swbfgamers.com/index.php?action=downloads;sa=view;down=1541
(I combined common and shell for convenience, but looking back I may separate again in a future update)

I was using the battlebelk interface tool, also found here. However, I just tried the one you suggested just now... same result. Am I supposed to do something with the shell? Or edit one of the files under LUA? (I noticed the battlebelk version of the tool does not have that folder in the "Custom" section.)

I may have to message Sereja to see if he did anything else differently, if nobody else knows.
#85
Quote from: wsa30h on May 19, 2020, 08:11:50 AM
thanks also dont forget your third faction can have an invisible reinforcement counter  SetReinforcementCount(3, 350)
just change the 350 to whatever you want.

Oh, didn't know that one. Thanks! Might come up in a future project, though for this map the Empire is supposed to have unlimited reinforcement count, so I won't be adding it here.




Update on the other front, turns out it is an issue with my common. The way I found out was I downloaded one of Sereja's asset folders, borrowed his common, then threw it into my map's folder, and just added the old "ReadDataFile("dc:COMMON\\common.lvl")" back into the LUA. All of a sudden my pistol animation was replaced with the Han Solo-style pistol animation that Sereja's maps use!

I have to guess that this means that my common is lacking something. It works just fine if I replace the base common in Gamedata, but it won't override the base common when in a mod folder. I will play around with it a bit, but if anyone has any idea what this could be...?
#86
Quote from: wsa30h on May 19, 2020, 02:03:04 AMquick question does the empire icon work when you have them set as team 3 ?

It does, yes.
#87
I'm still getting no sign of it working. Here is my updated LUA:

---------------------------------------------------------------------------
-- 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 IMP = 1
    --local ALL = 2
    local CIS = 1
    local ALL = 2
    local Empire = 3
--  These variables do not change
    local ATT = 1
    local DEF = 2

    AddMissionObjective(CIS, "red", "level.SepV.objectives.1");
--    AddMissionObjective(CIS, "orange", "level.SepV.objectives.2");
    AddMissionObjective(CIS, "orange", "level.SepV.objectives.3");
--    AddMissionObjective(ALL, "red", "level.SepV.objectives.1");
    AddMissionObjective(ALL, "orange", "level.SepV.objectives.2");
    AddMissionObjective(ALL, "orange", "level.SepV.objectives.3");

    ReadDataFile("sound\\bes.lvl;bes1gcw");
    ReadDataFile("dc:sound\\SepV.lvl;SepanVgcw");

    --ReadDataFile("dc:COMMON\\common.lvl")
    --ReadDataFile("GameData\\AddOn\\SepV\\Data\\_lvl_pc\\COMMON\\common.lvl")
    --ReadDataFile("AddOn\\SepV\\Data\\_lvl_pc\\COMMON\\common.lvl")
   ReadDataFile("common\\common-sepv.lvl");

    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",
"imp_fly_tiebomber",
        "imp_fly_tiefighter");

    ReadDataFile("dc:SIDE\\sep.lvl",
        "sep_fly_fighters",
"sep_fly_gunship",
"rip_inf_basic",
"dim_inf_basic",
"imp_inf_pilot");


    ReadDataFile("common\\common-sepv.lvl");
   
    SetAttackingTeam(ATT);

--      Alliance Stats
    SetTeamName(ALL, "Alliance")
    SetTeamIcon(ALL, "all_icon")
    AddUnitClass(ALL, "rip_inf_pilot",10)
    AddUnitClass(ALL, "rip_inf_mechanic",5)
    AddUnitClass(ALL, "rip_inf_trooper",5)
    SetHeroClass(ALL, "all_inf_lukeskywalker")

--      Imperial Stats
    --SetTeamName(IMP, "Empire")
    --SetTeamIcon(IMP, "imp_icon")
    SetTeamName(CIS, "CIS")
    SetTeamIcon(CIS, "CIS_icon")
    AddUnitClass(CIS, "dim_inf_pilot",10)
    AddUnitClass(CIS, "dim_inf_mechanic",5)
    AddUnitClass(CIS, "dim_inf_trooper",5)
    SetHeroClass(CIS, "imp_inf_darthvader")
   
--  Attacker Stats
    SetUnitCount(ATT, 20)
    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, 20)
    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)

    SetTeamName(3, "Empire")
    SetTeamIcon(3, "imp_icon")
    AddUnitClass(3, "imp_inf_pilot",8)
    AddUnitClass(3, "imp_inf_gunner",8)
    SetUnitCount(3, 16)
    SetTeamAsEnemy(3, ATT)
    SetTeamAsEnemy(3, DEF)

--  Level Stats
    ClearWalkers()
    AddWalkerType(0, 4) -- Droidekas
    AddWalkerType(1, 4) -- number of leg pairs, count
    AddWalkerType(2, 0)
    --SetMemoryPoolSize("EntityHover", 12)
    SetMemoryPoolSize("EntityFlyer", 55)
--  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)

SetAllowBlindJetJumps(0)
SetMemoryPoolSize("Aimer", 999)
SetAttackerSnipeRange(500)
SetDefenderSnipeRange(500)

    SetSpawnDelay(10.0, 0.25)
    ReadDataFile("dc:SepV\\SepV.lvl")
    ReadDataFile("dc:COMMON\\common.lvl")
    SetDenseEnvironment("false")
SetMinFlyHeight(20)
    SetMinPlayerFlyHeight(-50)
    SetMaxFlyHeight(150) --250
    SetMaxPlayerFlyHeight(150) --250
    SetAIVehicleNotifyRadius(400) --64
    SetStayInTurrets(1)

    AddDeathRegion("fall1")
    AddDeathRegion("death")

--  Sound Stats
    OpenAudioStream("sound\\bes.lvl",  "bes1gcw_music");
    OpenAudioStream("sound\\gcw.lvl",  "gcw_vo");
    OpenAudioStream("sound\\gcw.lvl",  "gcw_tac_vo");
    OpenAudioStream("sound\\bes.lvl",  "bes1");
    OpenAudioStream("sound\\bes.lvl",  "bes1");
    OpenAudioStream("dc:sound\\SepV.lvl",  "SepanV");
    OpenAudioStream("dc:sound\\SepV.lvl",  "SepanV");

    SetBleedingVoiceOver(ALL, ALL, "all_off_com_report_us_overwhelmed", 1);
    SetBleedingVoiceOver(ALL, CIS, "all_off_com_report_enemy_losing",   1);
    SetBleedingVoiceOver(CIS, ALL, "imp_off_com_report_enemy_losing",   1);
    SetBleedingVoiceOver(CIS, CIS, "imp_off_com_report_us_overwhelmed", 1);

    SetLowReinforcementsVoiceOver(ALL, ALL, "all_off_defeat_im", .1, 1);
    SetLowReinforcementsVoiceOver(ALL, CIS, "all_off_victory_im", .1, 1);
    SetLowReinforcementsVoiceOver(CIS, CIS, "imp_off_defeat_im", .1, 1);
    SetLowReinforcementsVoiceOver(CIS, ALL, "imp_off_victory_im", .1, 1);

    SetOutOfBoundsVoiceOver(1, "Allleaving");
    SetOutOfBoundsVoiceOver(2, "Impleaving");

    SetAmbientMusic(ALL, 1.0, "all_bes_amb_start",0,1);
    SetAmbientMusic(ALL, 0.99, "all_bes_amb_middle",1,1);
    SetAmbientMusic(ALL, 0.1,"all_bes_amb_end",2,1);
    SetAmbientMusic(CIS, 1.0, "imp_bes_amb_start",0,1);
    SetAmbientMusic(CIS, 0.99, "imp_bes_amb_middle",1,1);
    SetAmbientMusic(CIS, 0.1,"imp_bes_amb_end",2,1);

--   SetAmbientMusic(IMP, 1.0, "imp_bes_amb_start",0,1);
  --  SetAmbientMusic(IMP, 0.99, "imp_bes_amb_middle",1,1);
  --  SetAmbientMusic(IMP, 0.1,"imp_bes_amb_end",2,1);

    SetVictoryMusic(ALL, "all_bes_amb_victory");
    SetDefeatMusic (ALL, "all_bes_amb_defeat");
    SetVictoryMusic(CIS, "imp_bes_amb_victory");
    SetDefeatMusic (CIS, "imp_bes_amb_defeat");

--    SetVictoryMusic(IMP, "imp_bes_amb_victory");
  --  SetDefeatMusic (IMP, "imp_bes_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(CIS, CIS, 3, "imp_bonus_imp_hero");
    SetPlanetaryBonusVoiceOver(CIS, ALL, 3, "imp_bonus_all_hero");
    --SetPlanetaryBonusVoiceOver(IMP, IMP, 4, "imp_bonus_imp_reserves");
    --SetPlanetaryBonusVoiceOver(IMP, ALL, 4, "imp_bonus_all_reserves");

    SetPlanetaryBonusVoiceOver(ALL, ALL, 3, "all_bonus_all_hero");
    SetPlanetaryBonusVoiceOver(ALL, CIS, 3, "all_bonus_imp_hero");
    --SetPlanetaryBonusVoiceOver(ALL, ALL, 4, "all_bonus_all_reserves");
    --SetPlanetaryBonusVoiceOver(ALL, IMP, 4, "all_bonus_imp_reserves");


--  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


Here's where I put the files:




(Never mind the --common.lvl, that is the latest Steam one, which I replaced with a 1.2 version so I could get the Freecam back.)

I noticed in the tutorial thread that the other thread it links to mentions a common.req file, though that is just for the BF2 loading screen. Is there another element like that which I am missing here though? Some minor addition to another file somewhere?

Also, if anyone is willing to take a few minutes to test it to see if they can get it to work, here is my common.lvl file. The changes you should see are the Rebel and CIS icons replaced with a wrench icon (just borrowed one of the other holo icons from the assets for testing purposes) and the main ordnance impact replaced with the larger BF2 version.

I appreciate all the help guys!
#88
Quote from: Dark_Phantom on May 18, 2020, 11:13:50 AM
From what I remember, loading in a custom common is finicky, but Sereja has successfully done it for a long time.  His directory structure is:
Addon\004\Data\_lvl_pc\COMMON\common.lvl
then he seems to call it in the same way you do - what I remember from the discussion is that it's before sides but after sounds (which is where yours is, so that's good).

However, I would try something - please backup the stock common.lvl and try to load in the new common.lvl instead.  If it is crashing then, it is a problem with your common, if not, we need to dig deeper into why this isn't loading in and what you are trying to load in.

I have tested it before that way and it does work just fine. That was my first thought was that the common.lvl was broken, but it apparently is not. Just tested it again to be thorough, and yeah, it isn't the common.lvl.

As for what I'm changing, basically I am wanting to change the faction logo .msh's, as well as possibly the faction icons that appear when you select the map (not sure if that part is possible).

I remember seeing something mentioned about faction logos in one of the threads, and something about maybe having to rework the shell or something? But I don't think it was explained how.

In order to better gauge whether what I was doing was working or not, I made one other small change, which was to override the default "ord_explosion.fx" with the one from BF2 (bigger and has more sparks), since I figured that should be an easy one to change. But either way I have not seen any change when attempting to load the custom common.

Quote from: Led on May 18, 2020, 11:17:19 AM
dont use the DC

hard code the folder structure from gamedata

I should have a tutorial in the tutorials section

So, like this?

ReadDataFile("GameData\\AddOn\\SepV\\Data\\_lvl_pc\\COMMON\\common.lvl")

or?

ReadDataFile("AddOn\\SepV\\Data\\_lvl_pc\\COMMON\\common.lvl")

(Just tried both of those, but with no success.)
#89
Quote from: wsa30h on May 18, 2020, 10:51:02 AM
try just loading one of the common lvl's in the lua

Is "loading" done differently than how I have it put in? Or are you saying to remove the lines until I'm only attempting to load one?
#90
Hey fellow modders, I'm having a big of an issue trying to get a custom common.lvl to load into an addon map. I've looked across several threads and messages around here and the best I've been able to come up with is you just need the line:

ReadDataFile("dc:COMMON\\common.lvl")

In your LUA, along with placing the modified common.lvl into "Data\_lvl_pc\COMMON"

The thing is... I've done that and then some, but it won't work. In fact, to be thorough, I have uploaded two different common files (common.lvl and sepan_common.lvl) into EVERY level of my addon folder.

SepV\Data\_lvl_pc\COMMON\eng

Every one of those five folders has the two .lvl folders in it, just to quintuply sure I have them there! Then I even put the sepan_common.lvl in the base files too, to see if I could load it from there...

Then, I added multiple lines in the LUA to try and get *any* of them to read:


---------------------------------------------------------------------------
-- 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 IMP = 1
    --local ALL = 2
    local CIS = 1
    local ALL = 2
    local Empire = 3
--  These variables do not change
    local ATT = 1
    local DEF = 2

    AddMissionObjective(CIS, "red", "level.SepV.objectives.1");
--    AddMissionObjective(CIS, "orange", "level.SepV.objectives.2");
    AddMissionObjective(CIS, "orange", "level.SepV.objectives.3");
--    AddMissionObjective(ALL, "red", "level.SepV.objectives.1");
    AddMissionObjective(ALL, "orange", "level.SepV.objectives.2");
    AddMissionObjective(ALL, "orange", "level.SepV.objectives.3");

    ReadDataFile("sound\\bes.lvl;bes1gcw");
    ReadDataFile("dc:sound\\SepV.lvl;SepanVgcw")

  ReadDataFile("dc:COMMON\\common.lvl")
  ReadDataFile("dc:COMMON\\sepan_common.lvl")
  ReadDataFile("dc:common.lvl")
  ReadDataFile("dc:sepan_common.lvl")
  ReadDataFile("COMMON\\sepan_common.lvl")

    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",
"imp_fly_tiebomber",
        "imp_fly_tiefighter");

    ReadDataFile("dc:SIDE\\sep.lvl",
        "sep_fly_fighters",
"sep_fly_gunship",
"rip_inf_basic",
"dim_inf_basic",
"imp_inf_pilot");
   
    SetAttackingTeam(ATT);

--      Alliance Stats
    SetTeamName(ALL, "Alliance")
    SetTeamIcon(ALL, "all_icon")
    AddUnitClass(ALL, "rip_inf_pilot",10)
    AddUnitClass(ALL, "rip_inf_mechanic",5)
    AddUnitClass(ALL, "rip_inf_trooper",5)
    SetHeroClass(ALL, "all_inf_lukeskywalker")

--      Imperial Stats
    --SetTeamName(IMP, "Empire")
    --SetTeamIcon(IMP, "imp_icon")
    SetTeamName(CIS, "CIS")
    SetTeamIcon(CIS, "CIS_icon")
    AddUnitClass(CIS, "dim_inf_pilot",10)
    AddUnitClass(CIS, "dim_inf_mechanic",5)
    AddUnitClass(CIS, "dim_inf_trooper",5)
    SetHeroClass(CIS, "imp_inf_darthvader")
   
--  Attacker Stats
    SetUnitCount(ATT, 20)
    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, 20)
    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)

    SetTeamName(3, "Empire")
    SetTeamIcon(3, "imp_icon")
    AddUnitClass(3, "imp_inf_pilot",8)
    AddUnitClass(3, "imp_inf_gunner",8)
    SetUnitCount(3, 16)
    SetTeamAsEnemy(3, ATT)
    SetTeamAsEnemy(3, DEF)

--  Level Stats
    ClearWalkers()
    AddWalkerType(0, 4) -- Droidekas
    AddWalkerType(1, 4) -- number of leg pairs, count
    AddWalkerType(2, 0)
    --SetMemoryPoolSize("EntityHover", 12)
    SetMemoryPoolSize("EntityFlyer", 55)
--  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)

SetAllowBlindJetJumps(0)
SetMemoryPoolSize("Aimer", 999)
SetAttackerSnipeRange(500)
SetDefenderSnipeRange(500)

    SetSpawnDelay(10.0, 0.25)
    ReadDataFile("dc:SepV\\SepV.lvl")
    ReadDataFile("dc:COMMON\\common.lvl")
    SetDenseEnvironment("false")
SetMinFlyHeight(20)
    SetMinPlayerFlyHeight(-50)
    SetMaxFlyHeight(150) --250
    SetMaxPlayerFlyHeight(150) --250
    SetAIVehicleNotifyRadius(400) --64
    SetStayInTurrets(1)

    AddDeathRegion("fall1")
    AddDeathRegion("death")

--  Sound Stats
    OpenAudioStream("sound\\bes.lvl",  "bes1gcw_music");
    OpenAudioStream("sound\\gcw.lvl",  "gcw_vo");
    OpenAudioStream("sound\\gcw.lvl",  "gcw_tac_vo");
    OpenAudioStream("sound\\bes.lvl",  "bes1");
    OpenAudioStream("sound\\bes.lvl",  "bes1");
    OpenAudioStream("dc:sound\\SepV.lvl",  "SepanV");
    OpenAudioStream("dc:sound\\SepV.lvl",  "SepanV");

    SetBleedingVoiceOver(ALL, ALL, "all_off_com_report_us_overwhelmed", 1);
    SetBleedingVoiceOver(ALL, CIS, "all_off_com_report_enemy_losing",   1);
    SetBleedingVoiceOver(CIS, ALL, "imp_off_com_report_enemy_losing",   1);
    SetBleedingVoiceOver(CIS, CIS, "imp_off_com_report_us_overwhelmed", 1);

    SetLowReinforcementsVoiceOver(ALL, ALL, "all_off_defeat_im", .1, 1);
    SetLowReinforcementsVoiceOver(ALL, CIS, "all_off_victory_im", .1, 1);
    SetLowReinforcementsVoiceOver(CIS, CIS, "imp_off_defeat_im", .1, 1);
    SetLowReinforcementsVoiceOver(CIS, ALL, "imp_off_victory_im", .1, 1);

    SetOutOfBoundsVoiceOver(1, "Allleaving");
    SetOutOfBoundsVoiceOver(2, "Impleaving");

    SetAmbientMusic(ALL, 1.0, "all_bes_amb_start",0,1);
    SetAmbientMusic(ALL, 0.99, "all_bes_amb_middle",1,1);
    SetAmbientMusic(ALL, 0.1,"all_bes_amb_end",2,1);
    SetAmbientMusic(CIS, 1.0, "imp_bes_amb_start",0,1);
    SetAmbientMusic(CIS, 0.99, "imp_bes_amb_middle",1,1);
    SetAmbientMusic(CIS, 0.1,"imp_bes_amb_end",2,1);

--   SetAmbientMusic(IMP, 1.0, "imp_bes_amb_start",0,1);
  --  SetAmbientMusic(IMP, 0.99, "imp_bes_amb_middle",1,1);
  --  SetAmbientMusic(IMP, 0.1,"imp_bes_amb_end",2,1);

    SetVictoryMusic(ALL, "all_bes_amb_victory");
    SetDefeatMusic (ALL, "all_bes_amb_defeat");
    SetVictoryMusic(CIS, "imp_bes_amb_victory");
    SetDefeatMusic (CIS, "imp_bes_amb_defeat");

--    SetVictoryMusic(IMP, "imp_bes_amb_victory");
  --  SetDefeatMusic (IMP, "imp_bes_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(CIS, CIS, 3, "imp_bonus_imp_hero");
    SetPlanetaryBonusVoiceOver(CIS, ALL, 3, "imp_bonus_all_hero");
    --SetPlanetaryBonusVoiceOver(IMP, IMP, 4, "imp_bonus_imp_reserves");
    --SetPlanetaryBonusVoiceOver(IMP, ALL, 4, "imp_bonus_all_reserves");

    SetPlanetaryBonusVoiceOver(ALL, ALL, 3, "all_bonus_all_hero");
    SetPlanetaryBonusVoiceOver(ALL, CIS, 3, "all_bonus_imp_hero");
    --SetPlanetaryBonusVoiceOver(ALL, ALL, 4, "all_bonus_all_reserves");
    --SetPlanetaryBonusVoiceOver(ALL, IMP, 4, "all_bonus_imp_reserves");


--  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


And yet, nothing ever changes. I tested the common.lvl on the base game to make sure it wasn't an issue with the .lvl itself, and it works just fine. So somehow I've got a loading issue going on here, and I cannot figure out what it is. Anyone know what I'm missing?

Thanks in advance!