Big Cannon, How to make it work?

Makes the SEAS playable and adds features!
Post Reply
User avatar
Kharg
- Honorable Old Guard -
Posts: 406
Joined: Mon Jan 12, 2009 14:37 pm
Location: Italy - Sicily - Palermo
Contact:

Big Cannon, How to make it work?

Post by Kharg »

So this is the code that make big cannon work:

Code: Select all

class CSeasBigCannon inherit CTower

	var CObjHndl m_xBirdie;
	var bool m_bActivated;

	export proc void OnInit(bool p_bLoad)
		super.OnInit(p_bLoad);
		if(!p_bLoad)then
			m_bActivated=false;
			SetTurretLink("we");
			SetTurret("seas_hq_big_cannon_rotator");
			m_sTurretAttackAnim="attack_front";
		endif;
	endproc;

	export proc void Load(^CUOFReaderNode p_pxReaderNode)
		if(p_pxReaderNode^.GetType()=="SBig")then
			var ^CArc pxArc=^(p_pxReaderNode^.GetArc());
			m_xBirdie.DoKArc(pxArc^);
			pxArc^ << m_bActivated;
		else
			super.Load(p_pxReaderNode);
		endif;
	endproc;

	export proc void Save(^CUOFWriterNode p_pxWriterNode)
		super.Save(p_pxWriterNode);
		var CFourCC xBase="SBig";
		var ^CUOFWriterNode pxWalk=p_pxWriterNode^.AddSubChunk(xBase,1);
		var ^CArc pxArc=^(pxWalk^.GetArc());
		m_xBirdie.DoKArc(pxArc^);
		pxArc^ << m_bActivated;
		pxWalk^.Close();
	endproc;

	export proc void AbortTask()
		if(!m_bActivated)then
			m_bActivated=true;
			var ^CGameObj pxO=CSrvWrap.GetObjMgr()^.CreateObj("seas_hq_big_cannon_cannon", GetOwner());
			AddGroupedChildren(pxO^.GetGuid());
			var CFourCC xLink="we";
			pxO^.LinkAction(m_xTurret,xLink);
			m_xBirdie=pxO^.GetHandle();
		endif;
	endproc;

	export proc bool CreateBuildingCorpse()
		var ^CBuildingCorpse pxGameObj = cast<CBuildingCorpse>(CSrvWrap.GetObjMgr()^.CreateObj("BuildingCorpse",GetOwner(),GetPos(),GetRotation()));
		if(pxGameObj!=null)then
			pxGameObj^.SetSource(m_xTurret.GetObj());
			pxGameObj^.Init("seas_hq_big_cannon_rotator", GetName(), 8.0, GetAge());
			if(m_xTurret.IsValid())then
				pxGameObj^.SetRot(m_xTurret.GetObj()^.GetRot());
				pxGameObj^.SecRotAction(m_xTurret.GetObj()^.GetAdditionalRot(),0.0);
				m_xTurret.GetObj()^.Delete();
			endif;
		endif;
		pxGameObj = cast<CBuildingCorpse>(CSrvWrap.GetObjMgr()^.CreateObj("BuildingCorpse",GetOwner(),GetPos(),GetRotation()));
		if(pxGameObj!=null)then
			pxGameObj^.SetSource(this);
			pxGameObj^.Init("seas_hq_big_cannon", GetName(), 8.0, GetAge());
		endif;
		return true;
	endproc;

	export proc void Delete()
		if(m_xBirdie.IsValid())then m_xBirdie.GetObj()^.Delete(); endif;
		super.Delete();
	endproc;

	export proc bool AttackEnemy(^CFightingObj p_pxEnemy, vec3 p_vTarget, ref bool p_rbRotated)
		if(!m_bActivated)then return false; endif;
		var bool bReturned=super.AttackEnemy(p_pxEnemy,p_vTarget,p_rbRotated);
		var ^CGameObj pxBuildUp=m_xBirdie.GetObj();
		if(pxBuildUp!=null && !p_rbRotated)then
			pxBuildUp^.SetAnim("attack_front",1);
		endif;
		return bReturned;
	endproc;
endclass;
analyze it :P

This code make the cannon rotation possible

Code: Select all

export proc void OnInit(bool p_bLoad)
		super.OnInit(p_bLoad);
		if(!p_bLoad)then
			m_bActivated=false;
			SetTurretLink("we");
			SetTurret("seas_hq_big_cannon_rotator");
			m_sTurretAttackAnim="attack_front";
		endif;
	endproc;
This make a fuction load/save i think that we should remove
pxArc^ << m_bActivated;

Code: Select all

export proc void Load(^CUOFReaderNode p_pxReaderNode)
		if(p_pxReaderNode^.GetType()=="SBig")then
			var ^CArc pxArc=^(p_pxReaderNode^.GetArc());
			m_xBirdie.DoKArc(pxArc^);
			pxArc^ << m_bActivated;
		else
			super.Load(p_pxReaderNode);
		endif;
	endproc;

	export proc void Save(^CUOFWriterNode p_pxWriterNode)
		super.Save(p_pxWriterNode);
		var CFourCC xBase="SBig";
		var ^CUOFWriterNode pxWalk=p_pxWriterNode^.AddSubChunk(xBase,1);
		var ^CArc pxArc=^(pxWalk^.GetArc());
		m_xBirdie.DoKArc(pxArc^);
		pxArc^ << m_bActivated;
		pxWalk^.Close();
	endproc;

This is the trigger that the ClassName need to work: so if AbortTask is actived enable "seas_hq_big_cannon_cannon"

Code: Select all

export proc void AbortTask()
		  if(!m_bActivated)then
			m_bActivated=true;
			var ^CGameObj pxO=CSrvWrap.GetObjMgr()^.CreateObj("seas_hq_big_cannon_cannon", GetOwner());
			AddGroupedChildren(pxO^.GetGuid());
			var CFourCC xLink="we";
			pxO^.LinkAction(m_xTurret,xLink);
			m_xBirdie=pxO^.GetHandle();
		  endif;
	endproc;
and this i don't know what mean LOL

Code: Select all

export proc bool CreateBuildingCorpse()
		var ^CBuildingCorpse pxGameObj = cast<CBuildingCorpse>(CSrvWrap.GetObjMgr()^.CreateObj("BuildingCorpse",GetOwner(),GetPos(),GetRotation()));
		if(pxGameObj!=null)then
			pxGameObj^.SetSource(m_xTurret.GetObj());
			pxGameObj^.Init("seas_hq_big_cannon_rotator", GetName(), 8.0, GetAge());
			if(m_xTurret.IsValid())then
				pxGameObj^.SetRot(m_xTurret.GetObj()^.GetRot());
				pxGameObj^.SecRotAction(m_xTurret.GetObj()^.GetAdditionalRot(),0.0);
				m_xTurret.GetObj()^.Delete();
			endif;
		endif;
		pxGameObj = cast<CBuildingCorpse>(CSrvWrap.GetObjMgr()^.CreateObj("BuildingCorpse",GetOwner(),GetPos(),GetRotation()));
		if(pxGameObj!=null)then
			pxGameObj^.SetSource(this);
			pxGameObj^.Init("seas_hq_big_cannon", GetName(), 8.0, GetAge());
		endif;
		return true;
	endproc;

	export proc void Delete()
		if(m_xBirdie.IsValid())then m_xBirdie.GetObj()^.Delete(); endif;
		super.Delete();
	endproc;

	export proc bool AttackEnemy(^CFightingObj p_pxEnemy, vec3 p_vTarget, ref bool p_rbRotated)
		if(!m_bActivated)then return false; endif;
		var bool bReturned=super.AttackEnemy(p_pxEnemy,p_vTarget,p_rbRotated);
		var ^CGameObj pxBuildUp=m_xBirdie.GetObj();
		if(pxBuildUp!=null && !p_rbRotated)then
			pxBuildUp^.SetAnim("attack_front",1);
		endif;
		return bReturned;
	endproc;
endclass;
so i need help we should find a solution
▓▒▒▓▒▒▓▒▒▓▒▒▓▒▒▓▒▒▓▒▒▓▒▒▓
• Creator of the: • Current Projects:
  • SEASMOD
▓▒▒▓▒▒▓▒▒▓▒▒▓▒▒▓▒▒▓▒▒▓▒▒▓

Code: Select all

Kharg: I'll go to Nottingham on Monday for a 15 days trip! :D
AyCe: Make some screenshots!
User avatar
Adder
- Honorable Old Guard -
Posts: 85
Joined: Thu Oct 09, 2008 18:16 pm
Location: München
Contact:

Re: Big Cannon, How to make it work?

Post by Adder »

Find out whether we can enble logging -
Make these changes, then look for weird files appearing in the ParaWorld\bin directory or above or look at ..\My Documents\SpieleEntwicklungsKombinat\Paraworld\Logs

Code: Select all

	export proc void OnInit(bool p_bLoad)
		KLog.LogInfo("CBigTurret","OnInit();");
		super.OnInit(p_bLoad);
		if(!p_bLoad)then
			m_bActivated=false;
			SetTurretLink("we");
			SetTurret("seas_hq_big_cannon_rotator");
			m_sTurretAttackAnim="attack_front";
			KLog.LogInfo("CBigTurret","OnInit-1();");
		endif;
	endproc;

	export proc void AbortTask()
		KLog.LogInfo("CBigTurret","AbortTask();");
		if(!m_bActivated)then
			KLog.LogInfo("CBigTurret","AbortTask-1();");
			m_bActivated=true;
			var ^CGameObj pxO=CSrvWrap.GetObjMgr()^.CreateObj("seas_hq_big_cannon_cannon", GetOwner());
			AddGroupedChildren(pxO^.GetGuid());
			var CFourCC xLink="we";
			pxO^.LinkAction(m_xTurret,xLink);
			m_xBirdie=pxO^.GetHandle();
			KLog.LogInfo("CBigTurret","AbortTask-9();");
		endif;
	endproc;
Image
User avatar
Kharg
- Honorable Old Guard -
Posts: 406
Joined: Mon Jan 12, 2009 14:37 pm
Location: Italy - Sicily - Palermo
Contact:

Re: Big Cannon, How to make it work?

Post by Kharg »

i try and i find out that the logs can't help us :(
▓▒▒▓▒▒▓▒▒▓▒▒▓▒▒▓▒▒▓▒▒▓▒▒▓
• Creator of the: • Current Projects:
  • SEASMOD
▓▒▒▓▒▒▓▒▒▓▒▒▓▒▒▓▒▒▓▒▒▓▒▒▓

Code: Select all

Kharg: I'll go to Nottingham on Monday for a 15 days trip! :D
AyCe: Make some screenshots!
User avatar
Adder
- Honorable Old Guard -
Posts: 85
Joined: Thu Oct 09, 2008 18:16 pm
Location: München
Contact:

Re: Big Cannon, How to make it work?

Post by Adder »

Modified Building.usl for Kharg
Attachments
Building.usl.txt
(210.82 KiB) Downloaded 516 times
Image
User avatar
Adder
- Honorable Old Guard -
Posts: 85
Joined: Thu Oct 09, 2008 18:16 pm
Location: München
Contact:

Re: Big Cannon, How to make it work?

Post by Adder »

Weird, my changes to usl files seem to have no effect, not even if i damage the original file badly.
Image
User avatar
Adder
- Honorable Old Guard -
Posts: 85
Joined: Thu Oct 09, 2008 18:16 pm
Location: München
Contact:

Re: Big Cannon, How to make it work?

Post by Adder »

Changes to server.ini don't seem to make a difference either
Did anyone ever modify a usl file successfully ;-) if so, tell me which
Image
User avatar
AnthonyCole
- Admin -
Posts: 2134
Joined: Sat Apr 18, 2009 13:17 pm

Re: Big Cannon, How to make it work?

Post by AnthonyCole »

How did you modify? Did you made a mod or did you modified directly? Careful: If you edit Base Files there MAY BE a new version in the booterpack1 folder.
User avatar
Adder
- Honorable Old Guard -
Posts: 85
Joined: Thu Oct 09, 2008 18:16 pm
Location: München
Contact:

Re: Big Cannon, How to make it work?

Post by Adder »

I checked, there is no other building.usl except in the SEASMOD which i am editing

Even changing the original usl file makes no difference, the game is still running even if i put mistakes in the file.
Image
User avatar
timopw
- Multi-Tribe -
Posts: 157
Joined: Thu Dec 03, 2009 17:32 pm
Location: Deutschland
Contact:

Re: Big Cannon, How to make it work?

Post by timopw »

wo kann man die Big Cannon download :?:

dein timopw
Map gewerten mit Punkte:
0-1 = sehr schlecht
2 = schlecht
3 = gut
4-5 und hoher = sehr gut

mfg timopw
User avatar
AnthonyCole
- Admin -
Posts: 2134
Joined: Sat Apr 18, 2009 13:17 pm

Re: Big Cannon, How to make it work?

Post by AnthonyCole »

garnicht
User avatar
Akkarin
- Honorable Old Guard -
Posts: 224
Joined: Sat May 30, 2009 19:49 pm

Re: Big Cannon, How to make it work?

Post by Akkarin »

Hatte ich timopw nicht gebannt ?
Nun, ein Film um Opfer kann man erstens nicht machen wenn man die Geschichte der Täter erzählen will (weil Opfer schon allein wegen inherenter Charakteristika dazu neigen mitten im Film zu verschwinden),
User avatar
-exo-
- Multi-Tribe -
Posts: 105
Joined: Thu Nov 27, 2008 14:08 pm
Location: Germany

Re: Big Cannon, How to make it work?

Post by -exo- »

ne ich glaube nicht ^^
Seas Mod main Video Maker

Mein Youtube Paraworld channel http://www.youtube.com/user/exo19283746

Bei Fragen zum Seas Mod oder zu den SEAS selbst einfach anschreiben
Der SEAS MOD ist auch unter twitter erreichbar https://twitter.com/SEASMOD
JK1011
- Honorable Old Guard -
Posts: 298
Joined: Wed Aug 19, 2009 18:37 pm
Location: London, England

Re: Big Cannon, How to make it work?

Post by JK1011 »

may i ask if it is possible to get the cannon to aim where you want it to hit, in my opinion it is kind of pointless if it does not hit the right target? :|

Hatte ich timopw nicht gebannt ?
he only asked were the download is, maybe he don't know that it is not released lol
what did he do to get him banned? lol
User avatar
Scrat
- Mod -
Posts: 14223
Joined: Sat Jul 14, 2007 14:44 pm
Location: Bamberg / Budapest
Contact:

Re: Big Cannon, How to make it work?

Post by Scrat »

Arvinder101 wrote:may i ask if it is possible to get the cannon to aim where you want it to hit, in my opinion it is kind of pointless if it does not hit the right target? :|
That's the problem with it. By taking only the cannon's main part and not its platform, enabling it for the game is easy. But its bullets won't hit. :(

Hatte ich timopw nicht gebannt ?
he only asked were the download is, maybe he don't know that it is not released lol
what did he do to get him banned? lol
Nono, he just thought he had banned him already, for something else..
User avatar
timopw
- Multi-Tribe -
Posts: 157
Joined: Thu Dec 03, 2009 17:32 pm
Location: Deutschland
Contact:

Re: Big Cannon, How to make it work?

Post by timopw »

Wo kann ich Building.uslfinden?
Where can i find the Building.usl?
Map gewerten mit Punkte:
0-1 = sehr schlecht
2 = schlecht
3 = gut
4-5 und hoher = sehr gut

mfg timopw
User avatar
AnthonyCole
- Admin -
Posts: 2134
Joined: Sat Apr 18, 2009 13:17 pm

Re: Big Cannon, How to make it work?

Post by AnthonyCole »

Vergiss es. Dies ist leider nicht möglich :(
Post Reply

Return to “CEP (formerly SEASMOD)”