Secrets of the Reich - WIP

Modders can post their questions on scripting and more.

Moderators: Slitherine Core, BA Moderators

TopoSolitario
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 45
Joined: Tue Dec 28, 2010 9:59 am
Location: Madrid - Spain
Contact:

Post by TopoSolitario »

Merr wrote:There is also another way to add attributes instead of adding them to the CSV ... Look at the INIT.bsf in (battle/scripts folder).
AddAtrrib("RocketShots") ;
That solution seems more strict than adding column to the CSV... and forces you to modify the init.bsf for every new unit with that trait you want to add (instead of adding the value to squads.csv), not talking about scifi... there are many "customs" to be made, for example the Sherman V (rockets) field modification with a couple of air to ground fixed rocket ramps on the sides, DiY from hell! That kind of vehicles will probably shot only once, no spare rockets for the entire mission.

That can be usefull to add limited ammo to some ultra-heavy artillery units, like the Sdkfz with 6 nebelwerfer (http://misc.kitreview.com/armourreviews ... ewcs_1.jpg)

Image
Merr
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 903
Joined: Mon Aug 16, 2010 2:00 pm

Post by Merr »

TopoSolitario wrote: And another question (I never stop asking)...
assaults has no animation!
It is a really weird situation, both units going hand to hand, bullet to bullet, grenade to grenade... and no one moves... they just die! I probably will tweak Assault.BSF with an AddVizAnim for attacker and defender... it is a must have! The idea is to add something like this: AddVizAnim(unit,"FIRE", 255) in the propper place of the function.

Now the question is, if I create a new animation tag in the animation file for the unit called [ASSAULT] will it work if I add AddVizAnim(me, "ASSAULT", 255)? To work with current units I'll use "fire", but it is good to kown... as having some GI's charging with bayonets will be nice (or zombies advancing with open arms).

Another question is the 255 of the anim... what does it mean? in the docs it is said "the mask is the men affected (1 == man 0, 2 == man 1, etc) neg mask means play until you tell it play something else", so does 255 means animation for man 1, man 4 and man4? :s
I'm not too sure ... but 255 means ALL ... I'm not a programmer and never really messed with any other value than 255. Since the men's "mask" are individual, using 255 ensures any remaining masks will perform the animation.

You know, another good FUNCTION to look at is in the CombatTools.BSF. The function TurnAndFire (pasted below for quick reference) has examples , such as ... infantry "throwing grenades" when they are one tile away.

Here's the script from CombatTools .... Has several variaties of AddVizAnim ...
Note the AddVizAnim(me, "FLAME", 255) ... If the unit has flame damage it will call this animation. Now, look at an example of the US_Flamethrower.TXT file ... contains the tag [FLAME00] and the frames ... So, perhaps your [ASSAULT00] tag would work as you mentioned.

Code: Select all

// show the visual stuff with a unit turning and firing
FUNCTION TurnAndFire (me, x, y, unit, flameDamage) 
{
int fired ;
int grenades ;
int effectX ;
int effectY ;
int i;
int tileX ;
int tileY ;
int distance ;
int rangeBracket ;
int effectiveness ; 

	fired = 0 ;
	
	//Log("TaF: ", x, y, flameDamage) ;
	
	// focus camera on unit and play fire effect
	AddVizCamUnit(me) ;
	
	// do i need to use a charge to attack this unit?
	if ( (unit!= -1) && (GetAttrib (unit, "ArmourType") == 1 ))
	{
		distance = GetDistanceBetween(unit, me) ;
		rangeBracket = GetRangeBracket (distance) ;
		effectiveness = GetAttribArray(me, "APEffective", rangeBracket) ;
		if ( effectiveness == 0 )
		{
			SetAttrib(me, "APCharges", GetAttrib(me, "APCharges")-1 ) ;
		}
	}
	
	//Log ("hasgrenade, hasmg, range", grenades, GetAttrib (me, "HasMG"), GetDistanceBetween(me, unit)) ;
	
	// work out which attack anims to play
	if (flameDamage > 0 )
	{
		fired = 1 ;
		AddVizUnitTurnToFace(me, x, y) ;
		AddVizAnim(me, "FLAME", 255) ;	
	}
	else
	{
		AddVizUnitTurnToFire(me, x, y) ;
		grenades = GetAttrib (me, "HasGrenade") ;
		
		if ( grenades > 0 )
		{
			//Log ("has grenade");
			fired = 1 ;
			// if range is 1 tile throw grendes
			// unit could be -1
			if ( (unit != -1) && (GetDistanceFromUnit(me, x, y) < 2 ))
			{
				AddVizAnim(me, "grenadethrow", 255) ;
				AddVizFunctionCall("PlaySFX",x, y, 58) ;
				tileX = GetUnitX (unit) ;
				tileX *= 100 ;
				tileY = GetUnitY (unit) ;
				tileY *= 100 ;
				for (i=0; i<3; i++)
				{
					effectX = tileX + Rand (0,100) ;
					effectY = tileY + Rand (0,100) ;
					AddVizSpotAnim(effectX, effectY, "bang", 3, Rand(2,6)) ;					
				}
				//Log ("grenade thrown");
				
			}
			// only shoot small arms at  infantry
			// this will be true is unit == -1
			if ( GetAttrib(unit, "ArmourType") == 0 )
			{
				AddVizAnim(me, "FIRE", 255) ;
			}
		}
		if ( ( GetAttrib (me, "HasMG") == 1 ) && ( fired == 0 ) )
		{
			fired = 1 ;
			// only shoot mg at short range & soft targets
			//Log ("has mg");
			if ( (GetDistanceFromUnit(me, x, y) < 4 ) && ( ( GetAttrib(unit, "ArmourType") == 0 ) ) )
			{
				AddVizAnim(me, "MGFIRE", 255) ;
				//Log ("mg fired");
			}						
			else
			{
				AddVizAnim(me, "FIRE", 255) ;
			}
		}
	}

	if (fired == 0 )
	{
		fired = 1 ;
		// 255 means all 8 units.  It will work out which ones are valid.
		AddVizAnim(me, "FIRE", 255) ;	
		//Log ("no mg or grenade");
	}
	
	// then move the camera to look at the target
	AddVizCamUnit(unit) ;
}
TopoSolitario
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 45
Joined: Tue Dec 28, 2010 9:59 am
Location: Madrid - Spain
Contact:

Post by TopoSolitario »

Merr wrote:I'm not too sure ... but 255 means ALL ... I'm not a programmer and never really messed with any other value than 255. Since the men's "mask" are individual, using 255 ensures any remaining masks will perform the animation.
Yes I figured out yesterday... 8 men are controlled with 8 positions, something like 00000000 or (men 8 yes/no)(men 7 yes/no) and so on until 8 positions. So men 1 mask is 00000001, men 8, 5, 4 and 1 is 10011001. Now convert that BINARY numbers to decimal and you got your mask.
I'm a programmer... silly me! I didn't notice at a first glance... killing all men in unit is 255... 11111111 ah! silly me! :D

I put the fire animations for assault yesterday... that didn't work, I mean, it worked but made assault too slow as it goes from one animation to another and then resolve... I finally prefer the unanimated assault :D

Thank you for your answer Merr.
IainMcNeil
Site Admin
Site Admin
Posts: 13558
Joined: Fri Apr 01, 2005 10:19 am

Post by IainMcNeil »

Yes the men are a bit field with 1/0 for the 8 values. Think of the 10010101 it as a base 2 number and convert that to decimal.
TopoSolitario
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 45
Joined: Tue Dec 28, 2010 9:59 am
Location: Madrid - Spain
Contact:

Post by TopoSolitario »

The heavies are here...

Image

Modding is actually pretty easy. I thought it'll take me more time to add new units... I'll have to finish the units I want to make and create some scenarios (that is important, content without fun scenarios is crappy).

The campaign will tell the story of that new weapons... first we will be introduced to the gehenpanzer... then to the untotentruppen (their scape from the research facility after a hideous US para drop), then germans will try to stop and contain them... and finally allied will start showing their use of captured technology with some walkers and rocket-pioneers.
The final mission of this quick 5 mission campaign will be an aphoteosis of mechas, heavy infantry and untotentruppen (controled by both sides), absolutely crazy! :D
TopoSolitario
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 45
Joined: Tue Dec 28, 2010 9:59 am
Location: Madrid - Spain
Contact:

Post by TopoSolitario »

Sitrep... I'm almost done with the U.S. Rocket Pioneers...

They animate about 3 to 4 meters over the ground... and it looks really nice! they got FX for the jetpacks and sand FX when they get close to the land... Seeing a bunch of them floating is really crazy... it'll make germans mad! :D

I'll create for them a new unit type, "Flying Infantry" maybe... they'll be hard to hit but will not be able to enter forests or buildings... but the'll cross rivers like hell hand move any terrain just like if it was paved road... The ultimate recon unit. Hope you like them.

Image
Merr
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 903
Joined: Mon Aug 16, 2010 2:00 pm

Post by Merr »

Sounds cool ...

Hey Topo ... ever play Space Rangers 2 ?

Perhaps an interesting MP scenario ... same concept as SR2 ... Capture a VP and gain "resource points" added every turn ... Once you accumulate enough, a Bonus Button appears allowing you to add another unit at your main base. Scenario ends when all VP's taken or all enemy destroyed.

Screenshot from SR2 Reboot ....
Image
Acererak
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 327
Joined: Wed Aug 11, 2010 10:55 am

Post by Acererak »

I just want to say all this looks amazing...it´s like a whole new game!

Hope Topo goes to the end and completes the final campaign with all scenarios. Please, count on me for playtesting them if you need, or any gameplay ideas I might add.
Writing up a little story seems like a must as well. Pouring flavor all over the place....

Keep up amazing job!
TopoSolitario
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 45
Joined: Tue Dec 28, 2010 9:59 am
Location: Madrid - Spain
Contact:

Post by TopoSolitario »

I've been thinking about the small campaign Secrets of the Reich and the campaign and scenario presentations... here it goes:

CAMPAIGN:

* No one knows about all the horrors present at the battlefield.
* There were tech never seen before.
* The very few who fought that monsters, machines and men had never said a word about it.
* Until now!

SCENARIOS:

(1) Operation Tech Jackers, September 1944
* US Troops near Nancy were packed in secrecy to break thru german lines to capture as much german research labs as possible before they withdraw to Germany.
* This task force include both soldiers and engineers to start field research if possible.
* The whole operation was disguised as an individual initiative to steal german gold...
* ... but german Neue-Tech troops see the whole operation as the opportunity to battle-test their new toys.

(2) Untotentruppen
* Somewhere near Vraincourt.
* The darkest research lab in Europe was dealing with a new kind of TERROR weapon.
* But with limited resources and loose security procedures, their success soon turns into havoc!
* US Troops approach an apparently abandoned research center...

(3) Nacht der Untoten
* The horrors from Vraincourt are spreading quickly and deadly.
* The weapon thought to be used against the allies has now turn aginst their creators.
* Elite Neue-Tech troops are ready to cauterize the infection.
* Meanwhile allied tech-jackers are almost ready to deploy their new reinforcements.

(4) "Was ist das? Was ist los?!"
* After stopping the K-Bakterie infection, german Neue-Tech command launches an incursion to cut the supply lines of the Operation Tech Jackers.
* But they will discover a terrible fact...
* ...Allies have managed to use captured parts to create their own walkers!

(5) The final battle.
* The last research center was discovered by the outstanding Rocket Pioneers.
* Allied Tech Jackers, low on supplies, launches a total assault to capture remaining documents and sciencist.
* German Neue-Tech troops try to gain with their lives enought time for them to retreat and destroy the center.
* The most werid battle in WWII has begun.
IainMcNeil
Site Admin
Site Admin
Posts: 13558
Joined: Fri Apr 01, 2005 10:19 am

Post by IainMcNeil »

There is no reason you could not have VP's that spawned new units if you controlled them. All you would need is some way to decide which units to spawn and when to spawn them. Basically you could build units :)

You coudl probably even get turret units that cant move and can't load that can only be created on empty tiles.

Maybe you have an enginner unit that builds them and it uses up your resources. Resources could come from controlling VP's or something else if you fancy.

The possibilities are endless!
TopoSolitario
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 45
Joined: Tue Dec 28, 2010 9:59 am
Location: Madrid - Spain
Contact:

Post by TopoSolitario »

Spawn units... resources... hum... it is an option, BtW I'll keep it simple or I will never finish it! :D

Light update, rocket pioneers are almost done. I'm learning 3Ds MAX the rough way :S

Image
pipfromslitherine
Site Admin
Site Admin
Posts: 9863
Joined: Wed Mar 23, 2005 10:35 pm

Post by pipfromslitherine »

I think keeping it simple is a great idea! You are already pushing boundaries, and I for one want to see the story. Perhaps the next chapter can have resources and unit building ;).

Cheers

Pip
TopoSolitario
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 45
Joined: Tue Dec 28, 2010 9:59 am
Location: Madrid - Spain
Contact:

Post by TopoSolitario »

pipfromslitherine wrote:I think keeping it simple is a great idea! You are already pushing boundaries, and I for one want to see the story. Perhaps the next chapter can have resources and unit building ;).
The story is as silly as you can read some posts behind :D

But enough for a pulp tactical game :p

I got tired of 3Ds Max for today... finally I've learned HOW THE HECK biped free animation works! I've got problems with that with the other models, but with the rocket pioneers all went pretty fluid... finally!
The animations are nice, the idea is to use them scarcely... the little buuzterds fly for 24 AP with 2 point cost for any terrain (forest, buildings and fortifications impassable, but they can surf the waves!) with extremely good visibility... perfect scouts! Killing them ist ein pleasure, one of the three dead animations make the soldier crash and burn! :D

So, tired for today of Max... I got my hands in the first scenario presentation:

Image
Acererak
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 327
Joined: Wed Aug 11, 2010 10:55 am

Post by Acererak »

Nice little homage to Kelly´s Heroes here Topo. Great movie that fits perfectly with your alternate WW2 History atmosphere imo.

That presentation looks really cool.
TopoSolitario
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 45
Joined: Tue Dec 28, 2010 9:59 am
Location: Madrid - Spain
Contact:

Post by TopoSolitario »

Yep, I'm putting in some effort to keep the graphics up to the quality and style of the game :)
And yes... Kelly's Heroes is an amazingly good movie... How can Donald Southerland be a tank commander and a hippie all the same time in WWII? and still be a verosimile character! XD

Now, two more walkers to go... Brithish walker, the Vera Lynn MKI and the U.S. walker, the Oddball Special ;)

I was busy this mornig finishing the units artwork (that is, icons), so not much to update... just a little screenshot. Note the rocket pioneer crashed and burned and the pioneers icon below :)

Image
TopoSolitario
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 45
Joined: Tue Dec 28, 2010 9:59 am
Location: Madrid - Spain
Contact:

Post by TopoSolitario »

double posting... I'm clearly making a "level-up" in MAX knowledge... AH! this one was fast! :D

Ladies und gentlemen... The Oddball's Special!

"The Oddball's Special. With captured and damaged german GP legs, Cpt. Oddball and engineers of the TechJackers Task Force created this nice and reliable walking version of the Sherman Tank."

Image
TopoSolitario
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 45
Joined: Tue Dec 28, 2010 9:59 am
Location: Madrid - Spain
Contact:

Post by TopoSolitario »

Models finished!

So... that is... all models finished... I really like the way they turn out... I mean... axis look totally axis, american looks totally american and the brit looks outstandingly british!
Probably my favorite are the rocket pioneers... they look great, and the worst the heavies... I don't like the model nor the texture, I've to rework them somehow...
And the zombies... ah! are totally out of place... yes, but look at them, they're suposed to be horrible and the look like smiling pals ready to share their beers... or something... relly good and funny people undead. :p

Now I've to start with the worst part... scenario making :S

Image

*** EDIT ***

Forgot to say, to the left you can see, of course, the Vera Lynn WMKI... they came late becouse they were drinking tea and eating fancy pastry :p
PirateJock_Wargamer
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 325
Joined: Fri Apr 17, 2009 9:21 pm
Location: North West, UK
Contact:

Post by PirateJock_Wargamer »

Am really looking forward to this - WWII meets Mechs with the undead and flying troopers thrown in.

Positive-reinforcement ... just keep repeating this to yourself ....

Making the scenarios IS the best bit
Making the scerarios is the BEST bit

On a historical note, fancy pastries were severely rationed in WWII so I don't believe supply was high enough to slow done the war effort :wink:
TopoSolitario
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 45
Joined: Tue Dec 28, 2010 9:59 am
Location: Madrid - Spain
Contact:

Post by TopoSolitario »

PirateJock wrote:Making the scenarios IS the best bit
Making the scerarios is the BEST bit
I'm repeating that to myself like a mantra... I've took a small sight to the Scenario scripts and it is affordable, seems easy, anything you want to achieve can be achieved... that's nice.

The problem is that creating scenarios is hard, to the point that you can't describe in advance all the basic factors... that is

1. Will 32x25 be enough maneuver space?
2. If I make a bigger scenario then, should I control accurately VPs to avoid overflanking of the AI or the player?
3. Turn limits and victory points where and why?
4. Other variables?
5. Units?
6. Replayability?...

and many more.

I've started yesterday with the first one... I want a quick approach to "put all the meat in the pan"... with almost continous reinforcements until someone wins... that is easy for the beggining...

I'll be switching to scenario design forum pretty soon :p

Meanwhile, thank you for all your support! I hope the beta version fullfills your expectations (at least some of them).
Skanvak
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 315
Joined: Sun Apr 11, 2010 9:45 pm

Post by Skanvak »

As I see, we can mod the game to make W40K campaign :D
Post Reply

Return to “Battle Academy : Modders Corner ”