Back to the Vavoom Forum Archives


Forum

Sun, 27 Jun 2010 12:28:42

BlackJar72

Here is the real problem with not having VCC scripts for the basic games -- it makes learning the languages (or changes too it) hard. Basically, there are two ways to learn programming language (1) documentation and/or how-to book or, (2) reverse engineering existing code. Now, while the documentation isn't exactly complete and I don't think up to date, I've never had a problem with that in the least -- reverse engineering more fun and very easy to anyone who knows C++ basics (or Java or C# I guess). That leads to the question: I'm told that I can just include my VCC code, uncompiled, in the basepack. I've seen examples of this, but only with function, not whole objects. Can I use whole objects and include object / instance variables (not just method variables) -- some of my monsters need this to work. Also, I just plain can't get my mods to work -- I'm not sure what changes have happened between them or what I need to change, only that Vavoom crashes immediately if I use them! Thanks! (P.S. keep up the great work on the engine.)
Sun, 27 Jun 2010 13:26:54

BlackJar72

Here is what I get from debug:
Init: Adding ./basev/common/basepak.pk3
Init: adding ./doom2.wad
Init: adding ./doom2.gwa
Init: Adding ./basev/doom/basepak.pk3
Init: Adding ./basev/doom/xmodels.pk3
Init: Adding ./basev/doom/xmusic.pk3
Init: Adding ./basev/doom2/basepak.pk3
Init: Adding ./basev/doom2/xmusic.pk3
Init: adding oTEST-1.wad
Parsing
Log: progs/game/WBaronOfHell.vc:87: Invalid sprite name
Log: progs/game/WBaronOfHell.vc:88: State duration expected
Log: progs/game/WBaronOfHell.vc:91: Invalid sprite name
Log: progs/game/WBaronOfHell.vc:91: State duration expected
Log: progs/game/WBaronOfHell.vc:91: Identifier expected
Log: progs/game/WBaronOfHell.vc:91: Identifier expected
Log: progs/game/WBaronOfHell.vc:91: Frames must be A-Z, [, \ or ]
Log: progs/game/WBaronOfHell.vc:91: State duration expected
Log: progs/game/WBaronOfHell.vc:92: Invalid sprite name
Log: progs/game/WBaronOfHell.vc:92: State duration expected
Log: progs/game/WBaronOfHell.vc:95: Invalid sprite name
Log: progs/game/WBaronOfHell.vc:95: State duration expected
- VParser::Parse
- VPackage::LoadObject
- VMemberBase::StaticLoadPackage
- SV_Init
- Host_Init
Log: Doing C_Shutdown
Log: Doing CL_Shutdown
Log: Doing SV_Shutdown
All errors relate to this:
states
{
Spawn:
	BOSS AB 10 A_BaronLook
	Loop
See:
	BOSS AABBCCDD 3 A_Chase A_BarronRegenerate
	Loop
Melee:
Missile:
	BOSS EF 3 A_FaceTarget A_BarronRegenerate
	BOSS G 3 A_BarronAttack A_BarronRegenerate
	Goto See
Pain:
	BOSS H 3 A_Pain A_BarronRegenerate
	Goto See
Death:
	BOSS I 8
	BOSS J 8 Bright A_Scream
	BOSS K 8 Bright A_Explode
	BOSS L 8 Bright A_Fall
	BOSS MN 8
	BOSS O -1 A_BossDeath
	Stop
Raise:
	BOSS ONMLKJI 8
	Goto See
}
Specifically, the lines with "loop," "Melee:," "BOSS G 3 A_BarronAttack A_BarronRegenerate," and "Goto See" (twice, but not the third time) get errors. I don't think its checking the other objects, just crashing on the first. I What the hell am I doing wrong? How can I tells what I should do before hand? I'm confused... <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
Sun, 27 Jun 2010 16:28:39

Firebrand

The problem seems to be that you are calling two different state methods in the same states, something like this might solve it, I'll explain why below:
states
{
Spawn:
   BOSS AB 10 A_BaronLook
   Loop
See:
   BOSS A 3 A_Chase
   BOSS A 3 A_BarronRegenerate
   BOSS B 3 A_Chase
   BOSS B 3 A_BarronRegenerate
   BOSS C 3 A_Chase
   BOSS C 3 A_BarronRegenerate
   BOSS D 3 A_Chase
   BOSS D 3 A_BarronRegenerate
   Loop
Melee:
Missile:
   BOSS E 3 A_FaceTarget
   BOSS F 2 A_FaceTarget
   BOSS F 1 A_BarronRegenerate
   BOSS G 2 A_BarronAttack
   BOSS G 1 A_BarronRegenerate
   Goto See
Pain:
   BOSS H 2 A_Pain
   BOSS H 1 A_BarronRegenerate
   Goto See
Death:
   BOSS I 8
   BOSS J 8 Bright A_Scream
   BOSS K 8 Bright A_Explode
   BOSS L 8 Bright A_Fall
   BOSS MN 8
   BOSS O -1 A_BossDeath
   Stop
Raise:
   BOSS ONMLKJI 8
   Goto See
}
You can only call one state function per state, you were trying to use two state functions per state, that's what was causing all the errors, the DECORATE parser expects a sprite name after the method call, that's why it says that the sprite names are invalid. Also, notice the duration of the states for attacking, the original duration was 3, I divided the original time between different states, to avoid changing the monster behavior too much <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->. Hope this helps you out.

Back to the Vavoom Forum Archives