Page 1 of 1

RhenVar, How to remove the map boundary? [Solved]

Posted: Sun Nov 25, 2012 9:09 am
by RebelMarksman
Good day! I have, on this occasion, a fairly simple question. How to remove the deathregion from the location RhenWar in the Battlefront 1 ? Unfortunately, changes in the lua files do not give the desired result. This makes it difficult to flying on the fighters. Thank you in advance for the advice.

Here is the text file.
Hidden/Spoiler:
---------------------------------------------------------------------------
-- 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 = 2
local IMP = 1
-- These variables do not change
local ATT = 1
local DEF = 2


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

ReadDataFile("sound\\rhn.lvl;rhn1gcw");
ReadDataFile("sound\\Alliance.lvl;Alliancegcw");

ReadDataFile("SIDE\\all.lvl",
"all_hover_combatspeeder",
"all_fly_ywing",
"all_fly_snowspeeder",
"all_fly_xwing",
"all_inf_basicsnow",
"all_inf_pilotsnow",
"all_inf_lukeskywalkersnow",
"all_inf_smugglersnow")
ReadDataFile("SIDE\\imp.lvl",
"imp_hover_fightertank",
"imp_inf_basicsnow",
"imp_inf_dark_troopersnow",
"imp_walk_atat")
ReadDataFile("SIDE\\pov.lvl",
"pov_inf_basicsnow")


-- Alliance Stats
SetTeamName(ALL, "Alliance")
SetTeamIcon(ALL, "all_icon")
AddUnitClass(ALL, "all_inf_soldiersnow",11)
AddUnitClass(3, "pov_inf_marksmansnow",2)
AddUnitClass(ALL, "all_inf_pilot",4)
AddUnitClass(ALL, "all_inf_marksmansnow",7)
AddUnitClass(ALL, "all_inf_smugglersnow",2)
SetHeroClass(ALL, "all_inf_lukeskywalkersnow")

-- Imperial Stats
SetTeamName(IMP, "Empire")
SetTeamIcon(IMP, "imp_icon")
AddUnitClass(IMP, "imp_inf_storm_troopersnow",11)
AddUnitClass(IMP, "imp_inf_shock_troopersnow",3)
AddUnitClass(IMP, "imp_inf_pilotatat",8)
AddUnitClass(IMP, "imp_inf_scout_troopersnow",4)
AddUnitClass(IMP, "imp_inf_dark_troopersnow",2)



-- Alliance Stats
SetTeamName(3, "Locals")
SetTeamIcon(3, "all_icon")
AddUnitClass(3, "pov_inf_soldiersnow",10)
AddUnitClass(3, "pov_inf_vanguardsnow",4)
AddUnitClass(3, "pov_inf_pilot",3)
AddUnitClass(ALL, "all_inf_spysnow",2)
AddUnitClass(3, "pov_inf_marksmansnow4",3)
SetUnitCount(3, 28)
SetTeamAsEnemy(3,ATT)
SetTeamAsFriend(3,DEF)

-- Attacker Stats
SetUnitCount(ATT, 25)
SetReinforcementCount(ATT, 250)
AddBleedThreshold(ATT, 31, 0.0)
AddBleedThreshold(ATT, 21, 0.75)
AddBleedThreshold(ATT, 11, 2.25)
AddBleedThreshold(ATT, 1, 3.0)
SetTeamAsEnemy(ATT,3)

-- Defender Stats
SetUnitCount(DEF, 25)
SetReinforcementCount(DEF, 250)
AddBleedThreshold(DEF, 31, 0.0)
AddBleedThreshold(DEF, 21, 0.75)
AddBleedThreshold(DEF, 11, 2.25)
AddBleedThreshold(DEF, 1, 3.0)
SetTeamAsFriend(DEF,3)

-- Level Stats
ClearWalkers()
SetMemoryPoolSize("EntityWalker", -1)
AddWalkerType(0, 0) -- 0 droidekas
AddWalkerType(1, 0) -- 0 atsts with 1 leg pairs each
AddWalkerType(2, 1) -- 2 atats with 2 leg pairs each
SetMemoryPoolSize("CommandWalker", 1)
SetMemoryPoolSize("EntityFlyer", 5)
SetMemoryPoolSize("EntityHover", 4)
SetMemoryPoolSize("MountedTurret", 48)
SetMemoryPoolSize("PowerupItem", 60)
SetMemoryPoolSize("EntityMine", 70)
SetMemoryPoolSize("Weapon", 280)
SetMemoryPoolSize("OrdnanceTowCable", 3)
ReadDataFile("RHN\\RHN1.lvl")
SetSpawnDelay(10.0, 7.25)



SetAIVehicleNotifyRadius(800)
SetMaxFlyHeight(700)
SetMaxPlayerFlyHeight(700)

-- Sound Stats
OpenAudioStream("sound\\rhn.lvl", "rhngcw_music");
OpenAudioStream("sound\\gcw.lvl", "gcw_vo");
OpenAudioStream("sound\\gcw.lvl", "gcw_tac_vo");
OpenAudioStream ("sound\\Alliance.lvl", "Alliance");
OpenAudioStream("sound\\rhn.lvl", "rhn");
OpenAudioStream("sound\\rhn.lvl", "rhn");

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_RHN_amb_start", 0,1);
SetAmbientMusic(ALL, 0.99, "all_RHN_amb_middle", 1,1);
SetAmbientMusic(ALL, 0.1,"all_RHN_amb_end", 2,1);
SetAmbientMusic(IMP, 1.0, "imp_RHN_amb_start", 0,1);
SetAmbientMusic(IMP, 0.99, "imp_RHN_amb_middle", 1,1);
SetAmbientMusic(IMP, 0.1,"imp_RHN_amb_end", 2,1);
SetVictoryMusic(ALL, "all_rhn_amb_victory");
SetDefeatMusic (ALL, "all_rhn_amb_defeat");
SetVictoryMusic(IMP, "imp_rhn_amb_victory");
SetDefeatMusic (IMP, "imp_rhn_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

SetAttackingTeam(ATT);

-- Camera Stats
--Rhen Var 1 Harbor
--Overhead
AddCameraShot(0.912982, -0.196456, -0.349585, -0.075224, -152.503891, 46.803139, 144.810410);
--Ice Cave
AddCameraShot(0.237977, 0.038345, -0.958155, 0.154386, -231.233429, 9.040294, 33.124115);
--Building
AddCameraShot(0.931093, 0.004173, -0.364754, 0.001635, -111.028969, 7.049152, 58.597565);


end

Re: RhenWar, How to remove the deathregion ?

Posted: Sun Nov 25, 2012 9:34 am
by sereja2
Most easy way, to remove regions - just click on it in Zero Editor, and click "delete" button on your console.
You can also open your .RGN file, and delete no needed region lines.

Re: RhenWar, How to remove the deathregion ?

Posted: Sun Nov 25, 2012 10:02 am
by RebelMarksman
I think I would be more convenient remove it from RGN-file. Sereja, you can tell what exactly need is there to remove ?
Hidden/Spoiler:
Version(1);
RegionCount(2);

Region("shadow01 directional=0.0 color=210,247,177 colortop=210,247,177 colorbottom=200,200,200", 0)
{
Position(-155.389191, 9.358383, -35.274464);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Size(32.672211, 7.786102, 9.646397);
}

Region("Shadow02 directional=0.0 color=210,247,177 colortop=210,247,177 colorbottom=200,200,200", 0)
{
Position(-232.489044, 18.107800, -45.475124);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Size(55.668060, 21.849701, 77.204018);
}
Or is this.
Hidden/Spoiler:
Version(1);
RegionCount(19);

Region("CP2_Capture", 0)
{
Layer(1);
Position(-327.971161, 8.982397, -68.295547);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Size(23.617035, 10.000000, 19.272236);
}

Region("CP5_Capture", 0)
{
Layer(1);
Position(-17.616117, 8.148050, -111.897453);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Size(13.663027, 10.000000, 20.375008);
}

Region("CP6_Control", 0)
{
Layer(1);
Position(-76.283676, -5.907215, -38.803131);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Size(49.399723, 10.000000, 20.900955);
}

Region("CP3_Control", 1)
{
Layer(1);
Position(-132.264618, 12.287055, -108.355400);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Size(3.140083, 10.000000, 0.100000);
}

Region("CP5_Control", 1)
{
Layer(1);
Position(-12.790377, 2.792552, -173.480316);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Size(10.000000, 10.000000, 10.000000);
}

Region("CP6_Capture", 0)
{
Layer(1);
Position(-31.986256, 9.659758, 4.987162);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Size(10.323118, 3.768984, 12.552287);
}

Region("CP2_Control", 0)
{
Layer(1);
Position(-196.226212, -6.149278, -128.447647);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Size(211.140518, 10.000000, 400.062347);
}

Region("RainShadow01", 0)
{
Layer(1);
Position(-232.658142, 15.394285, -90.623909);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Size(52.290451, 18.127392, 32.874580);
}

Region("CP3_Capture", 0)
{
Layer(1);
Position(-125.735909, 4.692808, -107.981911);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Size(25.697052, 10.000000, 20.008804);
}

Region("CP7_Capture", 0)
{
Layer(1);
Position(-225.283951, 11.162819, -49.066502);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Size(14.629547, 10.000000, 15.973770);
}

Region("CP7_Control", 0)
{
Layer(1);
Position(-224.504272, 13.900352, -46.354160);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Size(10.000000, 10.000000, 10.000000);
}

Region("RainShadow03", 0)
{
Layer(1);
Position(-207.039841, 8.569971, -8.945454);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Size(30.625214, 10.000000, 24.796135);
}

Region("RainShadow02", 0)
{
Layer(1);
Position(-161.988190, 8.703770, -43.059742);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Size(38.103516, 10.000000, 17.539085);
}

Region("RainShadow05", 0)
{
Layer(1);
Position(-213.449844, 11.162033, -45.937344);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Size(5.322128, 10.000000, 18.330494);
}

Region("RainShadow04", 0)
{
Layer(1);
Position(-232.334579, 15.110149, -48.225296);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Size(5.129028, 10.000000, 17.465506);
}

Region("RainShadow06", 0)
{
Layer(1);
Position(-32.021187, 13.723804, 2.019690);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Size(11.396545, 14.210860, 20.582047);
}

Region("RainShadow07", 0)
{
Layer(1);
Position(20.331726, 9.504951, -111.831520);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Size(23.797596, 10.000001, 19.242485);
}

Region("RainShadow08", 0)
{
Layer(1);
Position(-99.307838, 5.725815, 11.842212);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Size(7.726036, 10.000000, 10.687698);
}

Region("RainShadow09", 0)
{
Layer(1);
Position(-65.331299, 14.081457, 42.292072);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Size(67.798660, 10.000000, 10.000000);
}

Re: RhenWar, How to remove the deathregion ?

Posted: Sun Nov 25, 2012 10:09 am
by sereja2
Yes, you need to find and delete exactly this lines:
Hidden/Spoiler:
Region("FalltoDeath", 0)
{
Position(-194.570068, -28.954323, 169.715775);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Size(207.503464, 10.000000, 203.560440);
}
I did not check it on practise, but those lines, looks like a death region...

Re: RhenWar, How to remove the deathregion ?

Posted: Sun Nov 25, 2012 10:28 am
by RebelMarksman
Thank You! I'll try to.

EDIT
Unfortunately I have not found these lines in RGN files. Maybe you know where should be deathregion in the files RhenVar1.rgn or RhenVar1_Design.rgn ?

There are also files RhenVar1_SoundRegionEnv, RhenVar1_SoundRegions and RhenVar1_SoundSpaces but I don't think this could be there.

Double posting is against the RULES; please EDIT your post instead -Staff

Re: RhenWar, How to remove the deathregion ?

Posted: Sun Nov 25, 2012 11:58 am
by sereja2
It seems, I just open Rhn2 world. I was almost sure, in Rhn1, should not be any death regions at all...
Interesting, where are you find it... :? There is no any abyss, just flat field... Are you sure it was exactly death region? Maybe it was a boundary?

Re: RhenWar, How to remove the deathregion ?

Posted: Sun Nov 25, 2012 2:29 pm
by RebelMarksman
This RhenWar harbour. When fighter flight in some invisible border, appears is an inscription - "Leave the field of battle!" - after fighter plane explodes. It does not provide an opportunity for maneuvers and full turnaround.

Re: RhenWar, How to remove the deathregion ?

Posted: Sun Nov 25, 2012 3:24 pm
by sereja2
Yes, it's call boundary! :lol:
You need to open file, named BND, and make sure, there is nothing more, except this lines:
Hidden/Spoiler:
[code]Boundary()
{
}
[/code]
Also, you may delete it from your .pth file.
Still, I believe, most easy way - just delete it in Zero Editor, by click boundary and delete it.

Re: RhenWar, How to remove the deathregion ?

Posted: Sun Nov 25, 2012 4:11 pm
by Marth8880
You can remove regions through Lua via:

Code: Select all

RemoveRegion(lua_State* aState); 
filling lua_State* aState with the name of the region in quotations. Just put it in ScriptPostLoad.

Get engaged: http://www.secretsociety.com/forum/down ... erence.txt

Re: RhenWar, How to remove the deathregion ?

Posted: Sun Nov 25, 2012 6:05 pm
by sereja2
Well, not sure about RebelMarksman, but, honestly say, I have no any idea, what exactly those lines cud be means :shock: . I never saw nothing similar before... Intersting, from what file, all those lines was extracted? And what means "Lua via"?

Re: RhenWar, How to remove the deathregion ?

Posted: Sun Nov 25, 2012 6:16 pm
by Marth8880
The game's executable. Also in the FAQ and in a text file called LUA_Callback_Reference.txt on psych0fred's site. The callback (line) removes a region from the map in ScriptPostLoad.

Also, http://dictionary.reference.com/browse/via?s=t, so "via" basically means "through".

Re: RhenWar, How to remove the deathregion ?

Posted: Sun Nov 25, 2012 6:57 pm
by sereja2
Wait a minute... This is how SWBF2 Mission.LUA script look's like? It's so unusual, and I just do not recognize, what is it! :lol:
By the way, are you sure, this may works for SWBF1?

Re: RhenWar, How to remove the deathregion ?

Posted: Sun Nov 25, 2012 7:30 pm
by Marth8880
sereja2 wrote:Wait a minute... This is how SWBF2 Mission.LUA script look's like? It's so unusual, and I just do not recognize, what is it! :lol:
What? :? There is no such script as Mission.LUA. It's a list of Lua callbacks...
sereja2 wrote:By the way, are you sure, this may works for SWBF1?
Best way to find out is to try it out for yourself.

Re: RhenVar, How to remove the map boundary?

Posted: Mon Nov 26, 2012 12:48 am
by AceMastermind
RebelMarksman wrote:When fighter flight in some invisible border, appears is an inscription - "Leave the field of battle!" - after fighter plane explodes.
A boundary is a path not a region. I don't think you should remove the boundary or else anyone can walk off the map, maybe just scale it larger but within the terrain limits. I'll fix the thread title to avoid confusion.

Re: RhenVar, How to remove the map boundary?

Posted: Mon Dec 03, 2012 8:51 am
by RebelMarksman
It was necessary to remove only the border. Thank you Sereja for the help in this.