Page 1 of 1

More questions

Posted: Thu Mar 31, 2011 12:24 pm
by Vuler
Allright, I really need to thank anyone who helped me in my previous topics. And I know I'm very annoying with my questions but I have MORE of them. Also remember that I'm not very clever at modding. To explain everything a little bit: I'm working on a side mod to Battlefront 2 which turns it into something like upgraded version of Battlefront 1. Here's what I need help with:
1. I would like to make heroes AI Controlled. There's already AI heroes mod and it causes Leia to not spawn on Tantive IV. Is it possible to make it without causing this bug?
2. Still about heroes: I'm planning to remove some heroes from game so there will be 3 heroes per side (I'm not sure about this one anyway). How to do it and also replace cut heroes with ones which will stay in-game?
3. I want to make Sniper Rifle shake while shooting (like in BF1) and give it a crosshair.
4. This one is VERY important. I want to remove some fighters, so there's 1 fighter and 1 bomber per side. Do I have to change ODF's of all the fighters or is it possible to just make 1 fighter and also replace other ships with it?
5. I want to add first person to vehicles. I know that I'm supposed to edit ships ODF like "First Person = <name of tga file>" but what else do I have to do? I also want to put in BF1's Marksperson's 1st person look. I see that there's skin but after looking at 1st person section in ODF I realized I have to do something else. What should I do?
6. I would like to disable stamina for some units (no sprint, roll as often as you want). I need help at it.
7. This is the last question. I want to replace AT-RTs with AT-PTs. They're already in ModTools, but I've heard there is some animation bug which makes them impossible to work. However, there are some AT-PTs in map Morshim: Imperial Attack. So is it possible to make stock AT-PTs work or are there some community made models?
Any help will be appreciated. Thank you.
EDIT: Ok, the main concept for the mod has changed A LOT. So, there's a little update: point 2 will not make an use in the final version of the mod. Now I'm also going to give 2 fighters and 1 bomber per side. I also won't remove any heroes. I'm even thinking about adding more of them.

Re: More questions

Posted: Thu Mar 31, 2011 4:13 pm
by DarthD.U.C.K.
you can find most of the answers to your questions by using the searchfunctions
1. the bug is caused by the 1.3patch but should be fixed in the latest version if reckon, you can use the normal way to add ai heroes
2. you can only have one hero unit per side (with lightsaberhealthbar'n stuff).
3. you can edit the recoil in he weapons odf. the reticule in third person is disabled with an odf-line you can fin dit either in the baseodf or by searching in the forum.
4. do you mean in space you only want one bomber and one fihter per side to be spawned?
5. its not the tga-file you put in, its the modelname (mshfile), for a tutorial about implementing 1stpersons, look into the everythingyouneedthread
6. you can disabling sprint by making it cost more stamina than the unit has, if you set the recoveryrate very high and make the costs for rolling low you should be able to roll all the time.
7. i think you can find a working at-pt in the conversionpack vehicleassets.

Re: More questions

Posted: Thu Mar 31, 2011 6:09 pm
by Jendo7
First person for ground vehicles doesn't work in this game, but you can add it for space flyers.

Re: More questions

Posted: Thu Mar 31, 2011 8:06 pm
by Fiodis
Jendo7 wrote:First person for ground vehicles doesn't work in this game, but you can add it for space flyers.
It doesn't? I'm pretty sure someone had 1st person for an AT-TE somewhere. (Probably a Geonosis map.)

Re: More questions

Posted: Thu Mar 31, 2011 8:30 pm
by AQT
Yeah, it does work. Pandemic just decided to not give ground vehicles FPM's, but the ability is still there.

Re: More questions

Posted: Thu Mar 31, 2011 8:32 pm
by CalvaryCptMike
Yeah because when I play online and am re-spawning it says: "following: soandso" and the person is in the at-te and is using first person.

EDIT: I made this post BEFORE AQT posted his answer. Now it looks like I'm stupid :lol:

Re: More questions

Posted: Fri Apr 01, 2011 6:50 am
by Jendo7
I have tried it several times, and it hasn't worked for me. I set up everything exactly the same for space flyers which does work, but when you press V for ground vehicles it stays in third person. If someone shows me a screenshot, I'll believe it but I'm pretty certain it's broken for this game.

Re: More questions

Posted: Fri Apr 01, 2011 9:17 am
by Vuler
Thanks guys!
2. you can only have one hero unit per side (with lightsaberhealthbar'n stuff).
Well, that's not exactly what I was talking about. But that's my fault. I tried to make the post shorter. Anyway, what I meant was that I want to leave 3 heroes per side (3 for Rebels, 3 for Republic, 3 for Empire and 3 for CIS) and CUT the others. I'm not sure how to do it. And when I'll do so, some maps will be hero-less. Because of that I'd also need to know how to replace heroes for some maps, so there will be other hero instead. And thanks for explaining other things.
4. do you mean in space you only want one bomber and one fihter per side to be spawned?
Yes, that's exactly what I mean. For 1st person in vehicles other than space ships, well, if I won't be able to give them 1st person look, too bad, I'll have to live with it. If this will be figured out, please let me know. Once again, thanks to everyone. :D
EDIT: Oh, and I forgot: I want to cut some classes from the game, so there'll be 5 classes like in BF1. Since I still don't know how to delete some characters, this still seems to be a problem.

Re: More questions

Posted: Sat Apr 02, 2011 12:47 pm
by CalvaryCptMike
As for the heros and cutting the sixth class from the game you will have to modify the source Lua Scripts.

This was taken from the stock Corascaunt Clone wars conquest script
Hidden/Spoiler:
[code]--
ReadDataFile("SIDE\\rep.lvl",
"rep_inf_ep3_rifleman",
"rep_fly_assault_DOME",
"rep_fly_gunship_DOME",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_officer",
"rep_inf_ep3_jettrooper",
"rep_hero_macewindu")

ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_fly_droidfighter_DOME",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_officer",
"cis_inf_sniper",
"cis_inf_droideka",
"cis_hero_darthmaul") --Whatever hero you want to use MUST be loaded in the script here, if you are trying to load "cis_hero_dooku" from the CIS side then you need to add him here, and in the SetHeroClass block down a few lines

ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_laser")


SetupTeams{

rep = {
team = REP,
units = 32,
reinforcements = 150,
soldier = { "rep_inf_ep3_rifleman",7, 25},
assault = { "rep_inf_ep3_rocketeer",1, 4},
engineer = { "rep_inf_ep3_engineer",1, 4},
sniper = { "rep_inf_ep3_sniper",1, 4},
officer = {"rep_inf_ep3_officer",1, 4},
special = { "rep_inf_ep3_jettrooper",1, 4}, --Delete this chunk of code to remove the 6th unit

},
cis = {
team = CIS,
units = 32,
reinforcements = 150,
soldier = { "cis_inf_rifleman",7, 25},
assault = { "cis_inf_rocketeer",1, 4},
engineer = { "cis_inf_engineer",1, 4},
sniper = { "cis_inf_sniper",1, 4},
officer = {"cis_inf_officer",1, 4},
special = { "cis_inf_droideka",1, 4}, --Delete this chunk of code to remove the 6th unit
}
}
SetHeroClass(CIS, "cis_hero_darthmaul") --Set this to what ever you want the hero to be, you have to make sure you already loaded him in the ReadDataFile block above.
SetHeroClass(REP, "rep_hero_macewindu")


[/code]
EDIT: Why doesn't colored text work for me!!! :runaway:
EDIT: thanks wulf

Re: More questions

Posted: Sat Apr 02, 2011 12:55 pm
by THEWULFMAN
CalvaryCptMike wrote:As for the heros and cutting the sixth class from the game you will have to modify the source Lua Scripts.
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
Conquest = ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")

-- These variables do not change
ATT = 1
DEF = 2

-- Empire Attacking (attacker is always #1)
CIS = ATT
REP = DEF

---------------------------------------------------------------------------
-- 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 ScriptPostLoad()

AddDeathRegion("death")
AddDeathRegion("death1")
AddDeathRegion("death2")
AddDeathRegion("death3")
AddDeathRegion("death4")




SetProperty ("LibCase1","MaxHealth",1000)
SetProperty ("LibCase2","MaxHealth",1000)
SetProperty ("LibCase3","MaxHealth",1000)
SetProperty ("LibCase4","MaxHealth",1000)
SetProperty ("LibCase5","MaxHealth",1000)
SetProperty ("LibCase6","MaxHealth",1000)
SetProperty ("LibCase7","MaxHealth",1000)
SetProperty ("LibCase8","MaxHealth",1000)
SetProperty ("LibCase9","MaxHealth",1000)
SetProperty ("LibCase10","MaxHealth",1000)
SetProperty ("LibCase11","MaxHealth",1000)
SetProperty ("LibCase12","MaxHealth",1000)
SetProperty ("LibCase13","MaxHealth",1000)
SetProperty ("LibCase14","MaxHealth",1000)


SetProperty ("LibCase1","CurHealth",1000)
SetProperty ("LibCase2","CurHealth",1000)
SetProperty ("LibCase3","CurHealth",1000)
SetProperty ("LibCase4","CurHealth",1000)
SetProperty ("LibCase5","CurHealth",1000)
SetProperty ("LibCase6","CurHealth",1000)
SetProperty ("LibCase7","CurHealth",1000)
SetProperty ("LibCase8","CurHealth",1000)
SetProperty ("LibCase9","CurHealth",1000)
SetProperty ("LibCase10","CurHealth",1000)
SetProperty ("LibCase11","CurHealth",1000)
SetProperty ("LibCase12","CurHealth",1000)
SetProperty ("LibCase13","CurHealth",1000)
SetProperty ("LibCase14","CurHealth",1000)



EnableSPHeroRules()

DisableBarriers("SideDoor1")
DisableBarriers("MainLibraryDoors")
DisableBarriers("SideDoor2")
DisableBarriers("SIdeDoor3")
DisableBarriers("ComputerRoomDoor1")
DisableBarriers("StarChamberDoor1")
DisableBarriers("StarChamberDoor2")
DisableBarriers("WarRoomDoor1")
DisableBarriers("WarRoomDoor2")
DisableBarriers("WarRoomDoor3")
PlayAnimation("DoorOpen01")
PlayAnimation("DoorOpen02")


--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "cp1"}
cp2 = CommandPost:New{name = "cp2"}
cp3 = CommandPost:New{name = "cp3"}
cp4 = CommandPost:New{name = "cp4"}
cp5 = CommandPost:New{name = "cp5"}
cp6 = CommandPost:New{name = "cp6"}

--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.con",
textDEF = "game.modes.con2",
multiplayerRules = true}

--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:AddCommandPost(cp5)
conquest:AddCommandPost(cp6)

conquest:Start()

end

function ScriptInit()
-- Designers, these two lines *MUST* be first.

SetPS2ModelMemory(4056000)

SetMapNorthAngle(180, 1)
SetMaxFlyHeight(25)
SetMaxPlayerFlyHeight (25)
AISnipeSuitabilityDist(30)



SetMemoryPoolSize("Music", 33)

ReadDataFile("ingame.lvl")


ReadDataFile("sound\\cor.lvl;cor1cw")

ReadDataFile("SIDE\\rep.lvl",
"rep_inf_ep3_rifleman",
"rep_fly_assault_DOME",
"rep_fly_gunship_DOME",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_officer",
"rep_inf_ep3_jettrooper",
"rep_hero_macewindu")

ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_fly_droidfighter_DOME",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_officer",
"cis_inf_sniper",
"cis_inf_droideka",
"cis_hero_darthmaul") --Whatever hero you want to use MUST be loaded in the script here, if you are trying to load "cis_hero_dooku" from the CIS side then you need to add him here, and in the SetHeroClass block down a few lines

ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_laser")


SetupTeams{

rep = {
team = REP,
units = 32,
reinforcements = 150,
soldier = { "rep_inf_ep3_rifleman",7, 25},
assault = { "rep_inf_ep3_rocketeer",1, 4},
engineer = { "rep_inf_ep3_engineer",1, 4},
sniper = { "rep_inf_ep3_sniper",1, 4},
officer = {"rep_inf_ep3_officer",1, 4},
special = { "rep_inf_ep3_jettrooper",1, 4}, --Delete this chunk of code to remove the 6th unit

},
cis = {
team = CIS,
units = 32,
reinforcements = 150,
soldier = { "cis_inf_rifleman",7, 25},
assault = { "cis_inf_rocketeer",1, 4},
engineer = { "cis_inf_engineer",1, 4},
sniper = { "cis_inf_sniper",1, 4},
officer = {"cis_inf_officer",1, 4},
special = { "cis_inf_droideka",1, 4}, --Delete this chunk of code to remove the 6th unit
}
}
SetHeroClass(CIS, "cis_hero_darthmaul") --Set this to what ever you want the hero to be, you have to make sure you already loaded him in the ReadDataFile block above.
SetHeroClass(REP, "rep_hero_macewindu")



-- Level Stats
ClearWalkers()
AddWalkerType(0, 3) -- 8 droidekas (special case: 0 leg pairs)
AddWalkerType(1, 0) --
AddWalkerType(2, 0) -- 2 spider walkers with 2 leg pairs each
AddWalkerType(3, 0) -- 2 attes with 3 leg pairs each
local weaponCnt = 210
SetMemoryPoolSize("Aimer", 22)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 250)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 18)
SetMemoryPoolSize("EntitySoundStream", 10)
SetMemoryPoolSize("EntitySoundStatic", 0)
SetMemoryPoolSize("MountedTurret",12)
SetMemoryPoolSize("PathFollower", 50)
SetMemoryPoolSize("Navigator", 50)
SetMemoryPoolSize("Obstacle", 375)
SetMemoryPoolSize("SoundSpaceRegion", 38)
SetMemoryPoolSize("TentacleSimulator", 0)
SetMemoryPoolSize("TreeGridStack", 140)
SetMemoryPoolSize("UnitAgent", 50)
SetMemoryPoolSize("UnitController", 50)
SetMemoryPoolSize("Weapon", weaponCnt)
SetMemoryPoolSize("EntityFlyer", 4)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("cor\\cor1.lvl","cor1_Conquest")
SetDenseEnvironment("True")
-- SetMaxFlyHeight(25)
--SetMaxPlayerFlyHeight (25)
AddDeathRegion("DeathRegion1")

-- Sound Stats

voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

voiceQuick = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_quick", voiceQuick)

OpenAudioStream("sound\\global.lvl", "cw_music")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\cor.lvl", "cor1")
OpenAudioStream("sound\\cor.lvl", "cor1")
-- OpenAudioStream("sound\\cor.lvl", "cor1_emt")

SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1)

SetLowReinforcementsVoiceOver(REP, REP, "rep_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(REP, CIS, "rep_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, CIS, "cis_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, REP, "cis_off_victory_im", .1, 1)

SetOutOfBoundsVoiceOver(2, "Repleaving")
SetOutOfBoundsVoiceOver(1, "Cisleaving")

SetAmbientMusic(REP, 1.0, "rep_cor_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_cor_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_cor_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_cor_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_cor_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_cor_amb_end", 2,1)

SetVictoryMusic(REP, "rep_cor_amb_victory")
SetDefeatMusic (REP, "rep_cor_amb_defeat")
SetVictoryMusic(CIS, "cis_cor_amb_victory")
SetDefeatMusic (CIS, "cis_cor_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")


-- Camera Stats
--Tat 1 - Dune Sea
AddCameraShot(0.419938, 0.002235, -0.907537, 0.004830, -15.639358, 5.499980, -176.911179);
AddCameraShot(0.994506, 0.104463, -0.006739, 0.000708, 1.745251, 5.499980, -118.700668);
AddCameraShot(0.008929, -0.001103, -0.992423, -0.122538, 1.366768, 16.818106, -114.422173);
AddCameraShot(0.761751, -0.117873, -0.629565, -0.097419, 59.861904, 16.818106, -81.607773);
AddCameraShot(0.717110, -0.013583, 0.696703, 0.013197, 98.053314, 11.354497, -85.857857);
AddCameraShot(0.360958, -0.001053, -0.932577, -0.002721, 69.017578, 18.145807, -56.992413);
AddCameraShot(-0.385976, 0.014031, -0.921793, -0.033508, 93.111061, 18.145807, -20.164375);
AddCameraShot(0.695468, -0.129569, -0.694823, -0.129448, 27.284357, 18.145807, -12.377695);
AddCameraShot(0.009002, -0.000795, -0.996084, -0.087945, 1.931320, 13.356332, -16.410583);
AddCameraShot(0.947720, -0.145318, 0.280814, 0.043058, 11.650738, 16.955814, 28.359180);
AddCameraShot(0.686380, -0.127550, 0.703919, 0.130810, -30.096384, 11.152356, -63.235146);
AddCameraShot(0.937945, -0.108408, 0.327224, 0.037821, -43.701199, 8.756138, -49.974789);
AddCameraShot(0.531236, -0.079466, -0.834207, -0.124787, -62.491230, 10.305247, -120.102989);
AddCameraShot(0.452286, -0.179031, -0.812390, -0.321572, -50.015198, 15.394646, -114.879379);
AddCameraShot(0.927563, -0.243751, 0.273918, 0.071982, 26.149965, 26.947924, -46.834148);

end

Fixed. You cant have colors inside code tags.

Re: More questions

Posted: Sat Apr 02, 2011 3:50 pm
by Vuler
Thanks everyone. I'll try out what you've told me. I've also edited my post, since the style of my mod changed. I realised that BF2 can't be turned into something as close to its prequel as I was expecting, but I'll still put in it some stuff from BF1.
Offtopic: Jendo7 and DarthDuck: you helped me a lot many times here and on my other topic. I'll add you to my friends list.