Some usefull scripts

Releasing the source files for your mod or map? Post em' here. (Applies to both SWBF1 & SWBF2)

Moderator: Moderators

Locked
Death_Commando

Some usefull scripts

Post by Death_Commando »

Well here are some useful scripts. I got the idea when i was playing the Kamino Campaign[Stormtroopers vs Clone Troopers]

CIS vs Galactic Empire:
Hidden/Spoiler:
[code] ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_droideka",
"cis_hero_darthmaul",
"cis_hover_aat")
ReadDataFile("SIDE\\imp.lvl",
"imp_inf_rifleman",
"imp_inf_rocketeer",
"imp_inf_engineer",
"imp_inf_sniper",
"imp_inf_dark_trooper",
"imp_hero_bobafett",
"imp_inf_officer")

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

SetupTeams{
rep = {
team = REP,
units = 12,
reinforcements = 150,
soldier = { "cis_inf_rifleman",9, 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},

},
cis = {
team = CIS,
units = 12,
reinforcements = 150,
soldier = { "imp_inf_rifleman",1,50},
assault = { "imp_inf_rocketeer",1,50},
engineer = { "imp_inf_engineer",1,50},
sniper = { "imp_inf_sniper",1,50},
officer = { "imp_inf_officer",1,4},
special = { "imp_inf_dark_trooper",1,4},
}
}

SetHeroClass(CIS, "cis_hero_darthmaul")
SetHeroClass(REP, "imp_hero_bobafett")[/code]
Galactic Republic vs Rebels
Hidden/Spoiler:
[code] ReadDataFile("SIDE\\rep.lvl",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_officer",
"rep_inf_ep3_jettrooper",
"rep_hover_fightertank",
"rep_hero_anakin",
"rep_hover_barcspeeder")
ReadDataFile("SIDE\\all.lvl",
"all_inf_rifleman_urban",
"all_inf_rocketeer_fleet",
"all_inf_sniper_fleet",
"all_inf_engineer_fleet",
"all_hero_hansolo_tat",
"all_inf_wookiee",
"all_inf_officer")

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

SetupTeams{
rep = {
team = REP,
units = 20,
reinforcements = 150,
soldier = { "rep_inf_ep3_rifleman",9, 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},

},
cis = {
team = CIS,
units = 32,
reinforcements = 150,
soldier = { "all_inf_rifleman_urban",9, 25},
assault = { "all_inf_rocketeer_fleet",1, 4},
engineer = { "all_inf_engineer_fleet",1, 4},
sniper = { "all_inf_sniper_fleet",1, 4},
officer = { "all_inf_officer",1, 4},
special = { "all_inf_wookiee",1,4},
},

}

SetHeroClass(CIS, "all_hero_hansolo_tat")
SetHeroClass(REP, "rep_hero_anakin")[/code]
Galactic Republic vs Galactic Empire:
Hidden/Spoiler:
[code] ReadDataFile("SIDE\\rep.lvl",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_officer",
"rep_inf_ep3_jettrooper",
"rep_hover_fightertank",
"rep_hero_anakin",
"rep_hover_barcspeeder")
ReadDataFile("SIDE\\imp.lvl",
"imp_inf_rifleman",
"imp_inf_rocketeer",
"imp_inf_engineer",
"imp_inf_sniper",
"imp_inf_dark_trooper",
"imp_hero_bobafett",
"imp_inf_officer")

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

SetupTeams{
rep = {
team = REP,
units = 20,
reinforcements = 150,
soldier = { "rep_inf_ep3_rifleman",9, 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},

},
cis = {
team = CIS,
units = 20,
reinforcements = 150,
soldier = { "imp_inf_rifleman",1,50},
assault = { "imp_inf_rocketeer",1,50},
engineer = { "imp_inf_engineer",1,50},
sniper = { "imp_inf_sniper",1,50},
officer = { "imp_inf_officer",1,4},
special = { "imp_inf_dark_trooper",1,4},
}
}

SetHeroClass(CIS, "imp_hero_bobafett")
SetHeroClass(REP, "rep_hero_anakin")[/code]
CIS vs Rebels
Hidden/Spoiler:
[code] ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_droideka",
"cis_hero_darthmaul",
"cis_hover_aat")
ReadDataFile("SIDE\\all.lvl",
"all_inf_rifleman_urban",
"all_inf_rocketeer_fleet",
"all_inf_sniper_fleet",
"all_inf_engineer_fleet",
"all_hero_hansolo_tat",
"all_inf_wookiee",
"all_inf_officer")

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

SetupTeams{
rep = {
team = REP,
units = 32,
reinforcements = 150,
soldier = { "cis_inf_rifleman",9, 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},

},
cis = {
team = CIS,
units = 32,
reinforcements = 150,
soldier = { "all_inf_rifleman_urban",9, 25},
assault = { "all_inf_rocketeer_fleet",1, 4},
engineer = { "all_inf_engineer_fleet",1, 4},
sniper = { "all_inf_sniper_fleet",1, 4},
officer = { "all_inf_officer",1, 4},
special = { "all_inf_wookiee",1,4},
}
}

SetHeroClass(CIS, "all_hero_hansolo_tat")
SetHeroClass(REP, "cis_hero_darthmaul")[/code]
EDIT:Bugs:When you're playing republic vs empire and you're in the empire team and your team captures a cp that droid voice apears

EDIT2:If you use them please give me credit
Caleb1117
2008 Most Original Avatar
Posts: 3096
Joined: Sun Aug 20, 2006 5:55 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set
Location: X-Fire: caleb1117 ಠ_ಠ

Re: Some usefull scripts

Post by Caleb1117 »

Whats this?
:?
MasterSkywalker
Major
Major
Posts: 501
Joined: Mon Apr 17, 2006 1:44 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: Some usefull scripts

Post by MasterSkywalker »

It's his script showing how he pulled off cross era battles :)
Death_Commando

Re: Some usefull scripts

Post by Death_Commando »

Thanks MasterSkywalker for explaning.And that is correct
Xavious
Sith Master
Sith Master
Posts: 2783
Joined: Mon Jun 12, 2006 3:46 pm

Re: Some usefull scripts

Post by Xavious »

What's the point of this? It's as simple as copy-pasting a couple lines of code. I mean, a monkey could do it.
Death_Commando

Re: Some usefull scripts

Post by Death_Commando »

I just thought that it would be usefull to some new modders that are not familiar with lua
User avatar
Thunder
Lieutenant Colonel
Lieutenant Colonel
Posts: 543
Joined: Sun Jul 15, 2007 6:57 pm
Location: Michigan

Re: Some usefull scripts

Post by Thunder »

true
but on the other hand
like if someone does that for their map without takeing your credit
...
you get it?
Death_Commando

Re: Some usefull scripts

Post by Death_Commando »

Yeah i get it
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Some usefull scripts

Post by Maveritchell »

Appreciate the attempt to be helpful, but how to do this is covered in the documentation.

Btw, your "bugs" aren't bugs, they're just that way because you only spent 15 seconds setting these .lua segments up. All you do is change:

Code: Select all

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

Code: Select all

    SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
    SetBleedingVoiceOver(REP, IMP, "rep_off_com_report_enemy_losing",   1)
    SetBleedingVoiceOver(IMP, REP, "imp_off_com_report_enemy_losing",   1)
    SetBleedingVoiceOver(IMP, IMP, "imp_off_com_report_us_overwhelmed", 1)
    
    SetLowReinforcementsVoiceOver(REP, REP, "rep_off_defeat_im", .1, 1)
    SetLowReinforcementsVoiceOver(REP, IMP, "rep_off_victory_im", .1, 1)
    SetLowReinforcementsVoiceOver(IMP, IMP, "imp_off_defeat_im", .1, 1)
    SetLowReinforcementsVoiceOver(IMP, REP, "imp_off_victory_im", .1, 1) 
There's no problem with you posting something like that; I would certainly just hope that you're not expecting credit for it, since this is, at best, a really, really basic tutorial.
Death_Commando

Re: Some usefull scripts

Post by Death_Commando »

I know the thing about the sounds but i was too lasy to do it.I dont expect credit i just wanted to help the beginners
User avatar
Thunder
Lieutenant Colonel
Lieutenant Colonel
Posts: 543
Joined: Sun Jul 15, 2007 6:57 pm
Location: Michigan

Re: Some usefull scripts

Post by Thunder »

Death_Commando wrote:
EDIT2:If you use them please give me credit
User avatar
trainmaster611
Sith Lord
Sith Lord
Posts: 1779
Joined: Thu Aug 24, 2006 5:22 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Building a railway to Coruscant
Contact:

Re: Some usefull scripts

Post by trainmaster611 »

Thunder wrote:
Death_Commando wrote:
EDIT2:If you use them please give me credit
QFT

All you did was delete one side and copy and paste a few lines. I guess its not a big deal but it would be easy to figure out. Most people (even newbies) would be able to do that upon opening the file. Its really kind of an understood thing.

There's no harm. It just wasn't necessary.
theITfactor
Chief Warrant Officer
Chief Warrant Officer
Posts: 327
Joined: Wed Jun 28, 2006 12:56 pm
Projects :: The Pwnfest and Games Complex
Games I'm Playing :: SWTOR
xbox live or psn: You and I Know
Location: The Old Republic
Contact:

Re: Some usefull scripts

Post by theITfactor »

You shouldn't be demanding credit for something this simple :roll:
Locked