Big Cannon, How to make it work?

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

Big Cannon, How to make it work?

Post by Kharg » Tue Nov 10, 2009 23:49 pm

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
- Admin -
Posts: 85
Joined: Thu Oct 09, 2008 19:16 pm
Location: München
Contact:

Re: Big Cannon, How to make it work?

Post by Adder » Wed Nov 11, 2009 0:11 am

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
- Admin -
Posts: 406
Joined: Mon Jan 12, 2009 15:37 pm
Location: Italy - Sicily - Palermo
Contact:

Re: Big Cannon, How to make it work?

Post by Kharg » Wed Nov 11, 2009 16:06 pm

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
- Admin -
Posts: 85
Joined: Thu Oct 09, 2008 19:16 pm
Location: München
Contact:

Re: Big Cannon, How to make it work?

Post by Adder » Wed Nov 11, 2009 20:08 pm

Modified Building.usl for Kharg
Attachments
Building.usl.txt
(210.82 KiB) Downloaded 278 times
Image

User avatar
Adder
- Admin -
Posts: 85
Joined: Thu Oct 09, 2008 19:16 pm
Location: München
Contact:

Re: Big Cannon, How to make it work?

Post by Adder » Wed Nov 11, 2009 23:54 pm

Weird, my changes to usl files seem to have no effect, not even if i damage the original file badly.
Image

User avatar
Adder
- Admin -
Posts: 85
Joined: Thu Oct 09, 2008 19:16 pm
Location: München
Contact:

Re: Big Cannon, How to make it work?

Post by Adder » Thu Nov 12, 2009 19:02 pm

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: 2001
Joined: Sat Apr 18, 2009 14:17 pm

Re: Big Cannon, How to make it work?

Post by AnthonyCole » Thu Nov 12, 2009 19:16 pm

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
- Admin -
Posts: 85
Joined: Thu Oct 09, 2008 19:16 pm
Location: München
Contact:

Re: Big Cannon, How to make it work?

Post by Adder » Thu Nov 12, 2009 23:05 pm

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 18:32 pm
Location: Deutschland
Contact:

Re: Big Cannon, How to make it work?

Post by timopw » Fri Apr 23, 2010 16:23 pm

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: 2001
Joined: Sat Apr 18, 2009 14:17 pm

Re: Big Cannon, How to make it work?

Post by AnthonyCole » Fri Apr 23, 2010 16:47 pm

garnicht

User avatar
Akkarin
- Mod -
Posts: 224
Joined: Sat May 30, 2009 20:49 pm

Re: Big Cannon, How to make it work?

Post by Akkarin » Fri Apr 23, 2010 21:46 pm

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 15:08 pm
Location: Germany

Re: Big Cannon, How to make it work?

Post by -exo- » Fri Apr 23, 2010 23:04 pm

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
- Admin -
Posts: 298
Joined: Wed Aug 19, 2009 19:37 pm
Location: London, England

Re: Big Cannon, How to make it work?

Post by JK1011 » Sat Apr 24, 2010 9:47 am

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: 14062
Joined: Sat Jul 14, 2007 15:44 pm
Location: Seldwyla
Contact:

Re: Big Cannon, How to make it work?

Post by Scrat » Sat Apr 24, 2010 14:06 pm

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 18:32 pm
Location: Deutschland
Contact:

Re: Big Cannon, How to make it work?

Post by timopw » Sun Jul 25, 2010 14:02 pm

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: 2001
Joined: Sat Apr 18, 2009 14:17 pm

Re: Big Cannon, How to make it work?

Post by AnthonyCole » Sun Jul 25, 2010 15:11 pm

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

Post Reply

Return to “CEP (formerly SEASMOD)”