Register FAQ Search Today's Posts Mark Forums Read
Go Back   JazzJackrabbit Community Forums » Open Forums » JCS & Scripting

Should J2O reupload fixed versions of broken scripts?

Violet CLM

JCF Éminence Grise

Joined: Mar 2001

Posts: 11,134

Violet CLM has disabled reputation

Jul 13, 2025, 06:06 PM
Violet CLM is offline
Reply With Quote
Should J2O reupload fixed versions of broken scripts?

From time to time, JJ2+ updates to a new version of AngelScript, and a handful of existing scripts can end up breaking as a result. In such cases, if the original authors can't be contacted, should J2O mods/admins reupload those existing scripts so that they can be played again?

For example, Psychomondus straight-up does not compile anymore: the author tried to do something that was never worked to begin with, and at some point AngelScript updated to treat that as a syntax error. The author was last online in November 2022. Should J2O reupload it? Or is that an infringement on the author's rights?

Are there other examples out there besides Psychomondus? Does the number of such uploads, or their popularity, affect the decision? Or how much time has passed since the original upload?

What about (parts of) levels that never worked to begin with, even for reasons other than AngelScript?
__________________
ForthRightMC

JCF Member

Joined: Jan 1970

Posts: 5

ForthRightMC has disabled reputation

Jul 15, 2025, 01:28 AM
ForthRightMC is offline
Reply With Quote
I also found one level where AngelScript won't work:

https://www.jazz2online.com/download...ayer-level-ii/

A Generic Single Player Level II

Maybe there will be a solution to fix it.
FabiAN[NC]

JCF Member

Joined: Jan 1970

Posts: 6

FabiAN[NC] has disabled reputation

Jul 16, 2025, 03:40 PM
FabiAN[NC] is offline
Reply With Quote
.
bevore many years, i had in mind to ask the community for help.
i saw the same problem, and ye i do have a script, that lost his compatility
.
to the story:
it was 2013, when i played with zepect, a script that was made by Foly
zepect showed it me, this script changed a few weapons
for example, the seecers, was different, here we saw a purple, bollyship missile
and when the missile exploded, there was a fire ring arround it
and that fire did gone from the center in form of a ring outside
.
i do have a screenshots from that script in action:

.
as i allready told that script dont works anymore, and lost his compatility.
.
here you go:
http://www.niceclan.de/dev/z/temporary/folta/
.
code:
Code:
/***************************************************/
/**	Made by Foly 						 		  **/
/**	Feel free to use/copy any part of this script **/
/***************************************************/

/***Constants***/

//Bomb Constants
const float cBombSpeed = 8; //xSpeed of the bomb
const float cBombPlayerSpeed = 6; //xSpeed the bomb can gain by player speed (if a player is running full speed it will add 6 xSpeed)
const int cBombLifeTime = 70*2; //Time till the bomb explodes (run away! run away!!!1)

//Shard Trail Constants
const int cSpreadSpeed = 2; //The higher this value the more the shards will spread perpendicular to the blasterbullet
const float cSlowDownSpeed = 6; //How much the shards slow down compared to the bullet
const int cTrailLifeTime= 70*1.5; //How long the shards will exist
const int cGreenDensityFactor = 6; //A lower factor gives more green shards
const int cBlueDensityFactor = 4; //A lower factor gives more blue shards

//Heavy Bomb Constants
const float cRadiusXFactor = 1.0;
const float cRadiusYFactor = 0.95;
const float cRadiusXSpdFactor = 1.0;
const float cRadiusYSpdFactor = 1.3;

//Boomerang gun constants
const float cMaxSpeed = 10; //The maximum speed the boomerang can have
const float cAcceleration = 0.2; //The acceleration of the boomerang
const float cReturnAccMult = 1; //When the boomerang is returning, this is a multiplier for the acceleration (so a value of 2 let's the boomerang return with 2x acceleration)
const float cVerSpdMult = 0.7; //When the boomerang is shot vertical and not returning, this is a multiplier for the acceleration (a higher value lets the boomerang go faster and higher upward)
const float cReturnSpeed = 0.4; //At what speed the boomerang returns back to the player (WARNING! This constant should always be higher than cAcceleration)
const float cReturnRadius = 32; //Radius in pixels at which the player takes the boomerang back

//Ice slow constants
const int cSlowTime = 18*5;


/***Variables***/
int FreezeTime = 0;

//Boomerang gun variables
array returning(32, false);
array boomerangfired(32, false);
array speed(32, cMaxSpeed);
array isfoly(32, false);

/***Math functions***/
//Calculates the distance between two points
float distance(float x1, float y1, float x2, float y2) {
  return sqrt((x2 - x1)*(x2 - x1) + (y2 - y1)*(y2 - y1));
}
 
//The square root function
float sqrt(float x) {
  float y = 1.0;
  for (int i = 0; i < 20; i++)
    y = (y + x/y)/2;
  return y;
}
 
//Determines the absolute value
float abs(float x) {
  if (x < 0)
    x = -x;
  return x;
}

/***Other functions***/
void CreateBomb(int objectID) {
	int playerID = jjObjects[objectID].creator - 32768;
	int bombID = jjAddObject(OBJECT::APPLE, jjPlayers[playerID].xPos, jjPlayers[playerID].yPos, jjObjects[objectID].creator, CREATOR::PLAYER);
	jjObjects[bombID].objType = 3;
	jjObjects[bombID].determineCurAnim(ANIM::AMMO, 1, true);
	jjObjects[bombID].special = 11;
	jjObjects[bombID].xSpeed = cBombSpeed*jjPlayers[playerID].direction + cBombPlayerSpeed*jjPlayers[playerID].xSpeed/16;
	jjObjects[bombID].ySpeed = -3;
	//jjSample(jjObjects[Bullet].xPos, jjObjects[Bullet].yPos, SOUND::BONUS_BONUS1); For some reason my sounds never seem to work :[
}

void DestroyBomb(int bombID) {
	int explosionID = jjAddObject(OBJECT::TNT, jjObjects[bombID].xPos, jjObjects[bombID].yPos, jjObjects[bombID].creator, CREATOR::PLAYER);
	jjDeleteObject(bombID);
	jjObjects[explosionID].determineCurAnim(ANIM::AMMO, 1, true);
	jjObjects[explosionID].killAnim = ANIM::AMMO;
	jjObjects[explosionID].state = STATE::EXPLODE;
	//jjSample(jjObjects[Bullet].xPos, jjObjects[Bullet].yPos, SOUND::COMMON_EXPSM1);
}

void CreateBigRocket(int objectID, bool powerup) {
	int rocketID;
	int playerID = jjObjects[objectID].creator - 32768;
	if (powerup)
		rocketID = jjAddObject(OBJECT::RFBULLETPU, jjPlayers[playerID].xPos, jjPlayers[playerID].yPos, jjObjects[objectID].creator, CREATOR::PLAYER);
	else
		rocketID = jjAddObject(OBJECT::RFBULLET, jjPlayers[playerID].xPos, jjPlayers[playerID].yPos, jjObjects[objectID].creator, CREATOR::PLAYER);
	jjObjects[rocketID].determineCurAnim(ANIM::SONCSHIP, 0, true);
	jjObjects[rocketID].special = 13;
	jjObjects[rocketID].direction = jjPlayers[playerID].direction;
	jjObjects[rocketID].xAcc = 0;
	jjObjects[rocketID].xSpeed = 3*jjPlayers[playerID].direction + 2*jjPlayers[playerID].xSpeed/16;
	jjObjects[rocketID].counterEnd = 70;
}

void BigRocketExplode(int rocketID, bool powerup) {
	int toasterID;
	jjObjects[rocketID].special = 14;
	for (int i = 0; i < 14; i++) {
		if (powerup)
			toasterID = jjAddObject(OBJECT::TOASTERBULLETPU, jjObjects[rocketID].xPos + 64*cRadiusXFactor*jjCos(i*1023/13), jjObjects[rocketID].yPos + 64*cRadiusYFactor*jjSin(i*1023/13), jjObjects[rocketID].creator, CREATOR::PLAYER);
		else
			toasterID = jjAddObject(OBJECT::TOASTERBULLET, jjObjects[rocketID].xPos + -16*cRadiusXFactor*jjCos(i*1023/13), jjObjects[rocketID].yPos + -16*cRadiusYFactor*jjSin(i*1023/13), jjObjects[rocketID].creator, CREATOR::PLAYER);
		jjObjects[toasterID].counter = 40; //You wouldn't believe what kind of bug comes up when you remove this line...
		jjObjects[toasterID].xAcc = 0;
		jjObjects[toasterID].xSpeed = -cRadiusXSpdFactor*jjCos(i*1023/13);
		jjObjects[toasterID].ySpeed = -cRadiusYSpdFactor*jjSin(i*1023/13);
	}
}

void CreateShardTrail(int bulletID, bool greentrail) {
	int shardID = jjAddObject(OBJECT::SHARD, jjObjects[bulletID].xPos, jjObjects[bulletID].yPos, 0, CREATOR::PLAYER);
	jjObjects[shardID].special = 12;
	if (greentrail)
		jjObjectPresets[OBJECT::SHARD].determineCurAnim(ANIM::PICKUPS, 6+jjRandom()%4, true);
	else
		jjObjectPresets[OBJECT::SHARD].determineCurAnim(ANIM::PICKUPS, 44+jjRandom()%4, true);
	if (jjObjects[bulletID].direction != 0) {
		jjObjects[shardID].xSpeed = jjObjects[bulletID].xSpeed - jjObjects[bulletID].direction*cSlowDownSpeed;
		jjObjects[shardID].ySpeed = -cSpreadSpeed*(jjRandom()%32 - 16)/16;
	} else {
		jjObjects[shardID].xSpeed = -cSpreadSpeed*(jjRandom()%32 - 16)/16;
		jjObjects[shardID].ySpeed = jjObjects[bulletID].ySpeed + cSlowDownSpeed;
	}
}

void BoomerangGun(int boomerangID) {
	int playerID = jjObjects[boomerangID].creator - 32768;;

	if ((abs(jjObjects[boomerangID].xSpeed) < cReturnSpeed && jjObjects[boomerangID].direction != 0) || (abs(jjObjects[boomerangID].ySpeed) < cReturnSpeed && jjObjects[boomerangID].direction == 0) && !returning[playerID])
		returning[playerID] = true;

	if (jjObjects[boomerangID].counter == 1) {
		if (playerID == p.playerID)
			p.noFire = true;
		jjObjects[boomerangID].determineCurAnim(ANIM::TUFBOSS, 3);
		jjObjects[boomerangID].counterEnd = 254;
	}

	if (returning[playerID]) {
		if (distance(jjPlayers[playerID].xPos, jjPlayers[playerID].yPos, jjObjects[boomerangID].xPos, jjObjects[boomerangID].yPos) < cReturnRadius)
			jjKillObject(boomerangID);
		
		if (speed[playerID] < cMaxSpeed)
			speed[playerID] = speed[playerID] + cAcceleration*cReturnAccMult;

		jjObjects[boomerangID].ySpeed = speed[playerID]*(jjPlayers[playerID].yPos - jjObjects[boomerangID].yPos)/distance(jjPlayers[playerID].xPos, jjPlayers[playerID].yPos, jjObjects[boomerangID].xPos, jjObjects[boomerangID].yPos);
		jjObjects[boomerangID].xSpeed = speed[playerID]*(jjPlayers[playerID].xPos - jjObjects[boomerangID].xPos)/distance(jjPlayers[playerID].xPos, jjPlayers[playerID].yPos, jjObjects[boomerangID].xPos, jjObjects[boomerangID].yPos);
	} else {
		if (speed[playerID] > 0)
			speed[playerID] = speed[playerID] - cAcceleration;
		if (jjObjects[boomerangID].direction == 0)
			jjObjects[boomerangID].ySpeed = -speed[playerID]*cVerSpdMult;
		else
			jjObjects[boomerangID].xSpeed = speed[playerID]*jjObjects[boomerangID].direction;
	}

	if (jjObjects[boomerangID].counter > 200)
		jjObjects[boomerangID].counter = 30;
}

/***onFunctions***/


/***Gameplay functions***/
void onLevelLoad() {
	jjAlert("||No errors in da codez");
}

void onMain() {
	/*if (jjIsServer) {
		for (int i = 0; i < 32; i++) {
			if (jjPlayers[i].isActive && !isfoly[i]) {
				isfoly[i] = true;
				jjChat("/rename " + i + " Foly");
			} else
			if (!jjPlayers[i].isActive)
				isfoly[i] = false;
		}
	}
	/*if (jjGameTicks%4 == 0 && FreezeTime > 0) {
		if (p.health == 0)
			FreezeTime = 1;
		if (FreezeTime == 1)
			p.jumpStrength = -10;
		FreezeTime--;
		if (p.xSpeed*p.xSpeed > 3.5*3.5)
			p.xSpeed = p.direction*4;
		j = jjAddObject(OBJECT::SHARD, p.xPos, p.yPos);
		jjObjectPresets[OBJECT::SHARD].determineCurAnim(ANIM::COMMON, 2, true);
		jjObjects[j].xSpeed = -4*(jjRandom()%32 - 16)/16;
		jjObjects[j].ySpeed = -4*(jjRandom()%32 - 16)/16;
		jjObjects[j].special = 43;
	}
	
	if (p.frozen > 0) {
		FreezeTime = cSlowTime;
		p.freeze(false);
		p.jumpStrength = -7;
	}*/
	
	for (int i = 0;	i < jjObjectCount; i++)
		if (jjObjects[i].isActive && jjObjects[i].creatorType == CREATOR::PLAYER) {

			//Maintain boomerang gun
			if (jjObjects[i].eventID == OBJECT::BLASTERBULLETPU) {
				BoomerangGun(i);
				jjObjects[i].animSpeed = 3;
				boomerangfired[jjObjects[i].creator - 32768] = true;
				continue;
			}
			
			//Create bomb
			if (jjObjects[i].eventID == OBJECT::TNT && jjObjects[i].state != STATE::EXPLODE) {
				CreateBomb(i);
				jjDeleteObject(i);
				continue;
			}
		
			//Destroy bomb
			if (jjObjects[i].eventID == OBJECT::APPLE && jjObjects[i].special == 11) {
				jjObjects[i].age++;
				if (jjObjects[i].age > cBombLifeTime)
					DestroyBomb(i);
				continue;
			}

			//Shard Trail
			if (((jjGameTicks%cBlueDensityFactor == 0 && (jjObjects[i].eventID == OBJECT::ICEBULLET || jjObjects[i].eventID == OBJECT::ICEBULLETPU)) || (jjGameTicks%cGreenDensityFactor == 0 && jjObjects[i].eventID == OBJECT::BLASTERBULLET)) && jjObjects[i].state != STATE::EXPLODE) {
				CreateShardTrail(i, (jjObjects[i].eventID == OBJECT::BLASTERBULLET));
				continue;
			}
	
			//Maintain shard lifetime
			if (jjObjects[i].eventID == OBJECT::SHARD && jjObjects[i].special == 12) {
				jjObjects[i].age++;
				if (jjObjects[i].age > cTrailLifeTime)
					jjDeleteObject(i); 
				continue;
			}
			
			//Create big rocket
			if (jjObjects[i].eventID == OBJECT::SEEKERBULLET || jjObjects[i].eventID == OBJECT::SEEKERBULLETPU) {
				CreateBigRocket(i, (jjObjects[i].eventID == OBJECT::SEEKERBULLETPU));
				jjDeleteObject(i);
				continue;
			}
			
			//Explode big rocket
			if (jjObjects[i].state == STATE::EXPLODE && jjObjects[i].special == 13) {
				switch (jjObjects[i].eventID) {
					case OBJECT::RFBULLET: BigRocketExplode(i, false); break;
					case OBJECT::RFBULLETPU: BigRocketExplode(i, true); break;
				}
				continue;
			}
		}
		
	for (int i = 0; i < 32; i++)
		if (!boomerangfired[i]) {
			speed[i] = cMaxSpeed;
			returning[i] = false;
			if (i == p.playerID)
				p.noFire = false;
		} else boomerangfired[i] = false;
}

Last edited by FabiAN[NC]; Jul 16, 2025 at 03:47 PM. Reason: kk, now it display the image
Violet CLM

JCF Éminence Grise

Joined: Mar 2001

Posts: 11,134

Violet CLM has disabled reputation

Jul 16, 2025, 08:48 PM
Violet CLM is offline
Reply With Quote
Add types to the four arrays, like so:
Code:
array returning(32, false);
array boomerangfired(32, false);
array speed(32, cMaxSpeed);
array isfoly(32, false);
and remove the sqrt and abs function definitions altogether.


To be clear, though, the point of this topic was asking whether J2O should fix broken scripts that are uploaded to J2O, not asking how to fix scripts.
__________________
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

All times are GMT -8. The time now is 01:41 AM.