Mods - Page 2

Mods

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

ccx can be viewed in HPI viewer.

Now on to getting this mod to run in spring...

I already had the files... in the dir... unittextures\tatex
I have them named the manner you have suggested above. I used gaf dump.

What else could be the issue?
User avatar
Storm
Posts: 443
Joined: 12 Sep 2004, 22:23

Post by Storm »

There are no problems whatsoever adding custom units to the Spring directory - it's just like your ordinary TA game. However, the problem with mods is that they often use custom textures, which as said twice already, must be in a certain format to work. I'm searching for the gafdump utility that is said to be good at converting batches.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

I have the textures in the right directory...

and for the second time they are named correctly. I am trying to patch my beta so I can run it in spring.


I think there is some other issue here.
Last edited by smoth on 28 Apr 2005, 05:46, edited 1 time in total.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

Storm wrote:There are no problems whatsoever adding custom units to the Spring directory - it's just like your ordinary TA game. However, the problem with mods is that they often use custom textures, which as said twice already, must be in a certain format to work. I'm searching for the gafdump utility that is said to be good at converting batches.

I have gafdump I can email it to you.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

More interesting data...

at first I thought... well, maybe my models have some sort of thing in their file or MAYBE my textures were wrong. SO I removed my gamedata dir... and renamed my commander model
http://www.planetannihilation.com/gunda ... pring1.jpg
as you can see from the shot... it is not the model crashing the game.

So, I figured MAYBE it is the custom textures.. or flat colors. So I used a model with alot of flat colors custom textures and 1 OTA texture..
http://www.planetannihilation.com/gunda ... pring3.jpg

Well, maybe it is one of my models that has some other texture.. so just to be safe I did a 3rd test.
http://www.planetannihilation.com/gunda ... pring2.jpg

So, something in my gamedata folder is the issue. Or maybe it is something linked further down the tree. either in my scripts or units. so I ran a check. No duplicate ids. No mis-used part ids in my current version. At this moment in time I am getting ready for bed. I will continue this work. but i have NO idea what the problem is.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

ok... I know I said I was going to bed.... but I tend to obsess....anyway...

So, I was thinking sure it isn't the models or the textures... well, how about I try a different method of attack.. a building.

Well, that worked. not only did it work but I could build units!

Well here is where it gets "interesting." Any of my walking units still won't build. BUT anything that doesn't have a walking/running anim will build. WTH? so I am not sure what it means. BUT I now have pinpointed the spring freeze to when the units that have a walk anim are created in game.

Image

So, does anyone of you spring people have any ideas on why the walking script could be the cause?
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

it seems like noone cares.. but I am going to continue this conversion journal for those who will convert their mod later.

As of now I have tracked down the specific segment of code. It is as I suspected the movement code. Code which runs fine in ota. SO, I am going to find out what exactly is it that spring has an issue with.

*heres to more digging* smoth
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

Please do, it will be a useful reference point, as well as highlighting issues the SYs may not be aware of. :-)
Fnordia
Former Engine Dev
Posts: 425
Joined: 13 Aug 2004, 16:11

Post by Fnordia »

If you send me a link (or use submit file) to a unit that makes spring freeze I can take a look at it.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

Code: Select all

	
		WHILE (TRUE)
		{
		moving = bMoving ;
		aiming = bAiming ; 
		IF (moving)
			{
			IF (aiming)
				{ 
				bCanAim = TRUE;
				CALL-SCRIPT shootwalk();
				}
                    
				IF (NOT aiming)
				{ 
				bCanAim = FALSE;
				CALL-SCRIPT walk();
				}
			}    
			IF (NOT moving)
			{ 
			bCanAim = TRUE;
			CALL-SCRIPT stopwalk();
			}

}
it doesn't like this section of code right here
when it is called spring freezes. I have NO idea why. it has something to do with the boolean's
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

ok.

I now know speciifically why it is fussing but why spring has an issue I don't know...

Sys... perhaps you guys can shed some light on it?

it is the statement "while(true)" this statement is used to see if we are still calling the motioncontroll function.

PLEASE Shed some light on this.
User avatar
Buggi
Posts: 875
Joined: 29 Apr 2005, 07:46

Post by Buggi »

WHILE(TRUE)

just creates an infinite loop...

Some programmers like to do a
FOR(;;)

You have to bust out of those loops with break or return statements.

I'm tempted to dive into the code, but I know I'd be hooked for life. The CS degree in me is just screaming "MORE MORE MORE"
@.@;;
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

/me is a senior in computer science curriculum(sp?... I know but it is late)

So I am somewhat above that sort of mistake.



The code is the same code used by all TA units to do movement. if you pull the code for the arm and core commander both use it. I have been looking at this script all night I don't know what is missing at the moment or what the issue is. I have resorted to digging through the OTA units to see how they are scripted. no luck yet.

See thing is you want an infinte loop while the unit is alive. Other wise the script will not run correctly.

*start loop*

am I moving?
yes?
> do animation untill I am flagged otherwise

Am I not moving?
yes?
>do stand animation untill otherwise.

*end loop and run again while I am alive.
*edit* note: it runs the animation once for each itteration hence why the loop has to run constant.*

I think the problem is that the TRUE that is used in the script is part of another refference. I am looking into this or perhaps a work around. I appreciate the help.
User avatar
Buggi
Posts: 875
Joined: 29 Apr 2005, 07:46

Post by Buggi »

so, basically

Code: Select all

while (alive)
{
   if (moving)
   {
      // move call
   }
   else
   {
      // idle call
   }
}
shouldn't there be a if(aiming) ?

I'd love to port this all to C# :P *twitches*
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

ack, don't get me started on C# or VB.net for that matter....




correct. there is also an if aiming. However, that only exists because the move anim moves the arms and lets face it we want to not shoot our own foot right? The reason I left it out was in the interest of simplicity.
User avatar
Buggi
Posts: 875
Joined: 29 Apr 2005, 07:46

Post by Buggi »

Seems so many ppl have something against C#... *sigh*
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

c# uses c++ 7.0 in which alot of functionality were stripped out.
User avatar
Buggi
Posts: 875
Joined: 29 Apr 2005, 07:46

Post by Buggi »

Ummmmm no
C# has as much to do with C++ as C++ has to do with C as it had to do with Algol... and so on.

I teach classes on C#. :) I'm fairly proficient at it. :P

</debate>
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

interesting. I'll leave it at that. I am more interested in this bug.

*sighs* well my workaround does the trick but I don't like it. It is the... best workaround I can get at the moment. *sighs more.....

ok, all I did was put a delay in my loop. I don't why I need to because the OTA units don't have one. I'd really like to know why I have had to do this. Either way....

Here is the snipet:

Code: Select all

MotionControl(pheh)
	{	
	pheh = 1;
	
	/*spring has an issue with THIS block of code.*/
		while (pheh)
		{
				//ugly workaround to peculiar bug in spring
		sleep 120;
			IF ( bMoving )
			{
				IF ( bAiming )
				{ 
				bCanAim = TRUE;
				CALL-SCRIPT shootwalk();
				}
                    
				IF ( !bAiming )
				{ 
				bCanAim = FALSE;
				CALL-SCRIPT walk();
				}
			}    

			IF ( !bMoving )
			{ 
			bCanAim = TRUE;
			CALL-SCRIPT stopwalk();
			}
		}
		
	} 
Post Reply

Return to “Game Development”