Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Mon Nov 23, 2026 3:22 pm
All times are UTC + 0
Turret coding problems.
Moderators: Global Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [13 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Aro
Alcohol Fueled


Joined: 10 Sep 2006

PostPosted: Tue Apr 29, 2008 2:03 pm    Post subject:  Turret coding problems. Reply with quote  Mark this post and the followings unread

Hey. I Have had a long break from Tiberian Sun modding, and now I'm a little rusty, so I've already encountered a small problem which I'm sure I'd of been able to overcome 3 months ago. For Twisted Insurrection, There is a building called "The Coastal Gun Battery" which is both a Turret, and a Base together.



I've got no idea what I'm going to have to put in the art and rules.ini to get this working properly. Help would be greatly appreciated.
(I Feel embarrassed asking for help on such a simple matter)

Back to top
View user's profile Send private message
Dutchygamer
President


Joined: 18 Jun 2005
Location: Dordrecht, the Netherlands

PostPosted: Tue Apr 29, 2008 3:44 pm    Post subject: Reply with quote  Mark this post and the followings unread

I suggets looking at the GDI component tower and one of it's turrets codes in both rules.ini and art.ini Wink

Back to top
View user's profile Send private message Send e-mail Skype Account
Aro
Alcohol Fueled


Joined: 10 Sep 2006

PostPosted: Tue Apr 29, 2008 3:56 pm    Post subject: Reply with quote  Mark this post and the followings unread

I've already done it, but it doesn't help me in any way, as I said, this is both a turret and a base together, and the turret isn't a voxel, which makes this all-the-more awkward.

Back to top
View user's profile Send private message
Dutchygamer
President


Joined: 18 Jun 2005
Location: Dordrecht, the Netherlands

PostPosted: Tue Apr 29, 2008 4:43 pm    Post subject: Reply with quote  Mark this post and the followings unread

Could you share your codes then maybe?

Back to top
View user's profile Send private message Send e-mail Skype Account
Crimsonum
Seth


Joined: 14 Jul 2005
Location: Fineland

PostPosted: Tue Apr 29, 2008 4:50 pm    Post subject: Reply with quote  Mark this post and the followings unread

Well, you can try to make the turret as a seperate animation, and look at the codes of the EMP cannon. Just change the voxel animation into your specific SHP animation (with voxel=no of course).

You can also make a dummy, invisible building, which would act as the base, even when all of the graphics are in the turret. This way, however, you can't have any damage frames.

_________________


Back to top
View user's profile Send private message
Machine
Commander


Joined: 01 Feb 2007
Location: National Reference Laboratory for IPNV

PostPosted: Tue Apr 29, 2008 4:57 pm    Post subject: Reply with quote  Mark this post and the followings unread

Here I'm to save the day Laughing

Rules.ini:

In the animation list:

###=CGUNBAT ; Turret's base
###=CGUNBAT_A ; The turret itself
###=CGUNBATMK ; Buildup, if you have it

Building list:

###=CGUNBAT

; Coastal Gun Battery
[CGUNBAT]
Name=Coastal Gun Battery
BaseNormal=no
Turret=yes
TurretAnim=CGUNBAT_A
TurretAnimIsVoxel=false
TurretAnimX=0
TurretAnimY=0
TurretAnimZAdjust=-30
BarrelAnimIsVoxel=no

Art.ini:

; Coastal Gun Battery
[CGUNBAT]
Normalized=yes
Remapable=yes
Foundation=1x1
Buildup=CGUNBATMK
Height=
PBarrelLength=
PrimaryFireFLH=
TurretNotExportedOnGround=yes

That should do it #Tongue

EDIT: Didn't notice that both the turret and the base were merged, just make a 3 frames transparent SHP with the same size as the turret, and call it CGUNBAT (as an example), then call CGUNBAT_A to the animation containing the base and the turret. However I would suggest separating them because you won't be able to have damaged frames.

Last edited by Machine on Tue Apr 29, 2008 5:02 pm; edited 1 time in total

Back to top
View user's profile Send private message Visit poster's website Skype Account
Aro
Alcohol Fueled


Joined: 10 Sep 2006

PostPosted: Tue Apr 29, 2008 4:58 pm    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
You can also make a dummy, invisible building, which would act as the base, even when all of the graphics are in the turret. This way, however, you can't have any damage frames.


Could you post up a code as an example please? I don't have the .INI files handy presently. I Had the dummy base idea in mine, but I wasn't sure how i was to work it, I used a similar method with the Overcharge idea, as stated in different thread, but had no luck.

Edit: Just missed machines post. #Tongue Time to try it out.

Back to top
View user's profile Send private message
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Wed Apr 30, 2008 3:07 am    Post subject: Reply with quote  Mark this post and the followings unread

Yuri 08 wrote:
You can also make a dummy, invisible building, which would act as the base, even when all of the graphics are in the turret. This way, however, you can't have any damage frames.

Machine wrote:
I would suggest separating them because you won't be able to have damaged frames.

Actually you can have a damaged turret anim; just have a separate SHP for the damaged turret anim (call it cgunbat_ad.shp or whatever) and then add TurretAnimDamaged=CGUNBAT_AD to the code of the building in rules.ini. Make sure the art.ini code for CGUNBAT_AD exists (you can just copy the code of CGUNBAT_A for this) and also don't forget to add it to the animation list in Rules.ini.

_________________

Back to top
View user's profile Send private message ModDB Profile ID YouTube User URL Facebook Profile URL
Aro
Alcohol Fueled


Joined: 10 Sep 2006

PostPosted: Wed Apr 30, 2008 7:46 am    Post subject: Reply with quote  Mark this post and the followings unread

Thanks guys. I've gone for the Invisible base idea, I'm unable to test it in game because I've got an issue over here, However, The gun battery appears listed under the civilian section in FinalSun, and I can select it and place it on the map, though all I can see is the foundation outline not the structure, is it normal not to see an SHP turret in FinalSun?

Back to top
View user's profile Send private message
Dutchygamer
President


Joined: 18 Jun 2005
Location: Dordrecht, the Netherlands

PostPosted: Wed Apr 30, 2008 9:57 am    Post subject: Reply with quote  Mark this post and the followings unread

Ehmm, no. The Nod Sam site has an shp turret, and it's still visible in FS (even though FS will freeze if you want to place it when you give it a new shp turret)

Back to top
View user's profile Send private message Send e-mail Skype Account
Allied General
General


Joined: 19 Mar 2004
Location: United Kingdom

PostPosted: Wed Apr 30, 2008 10:40 am    Post subject: Reply with quote  Mark this post and the followings unread

if its a mod file then yes

_________________

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
Aro
Alcohol Fueled


Joined: 10 Sep 2006

PostPosted: Wed Apr 30, 2008 5:09 pm    Post subject: Reply with quote  Mark this post and the followings unread

It works like a charm. Thanks guys.



Coast Gun Batteries.PNG
 Description:
 Filesize:  207.12 KB
 Viewed:  3330 Time(s)

Coast Gun Batteries.PNG



Back to top
View user's profile Send private message
Destiny
President


Joined: 02 May 2006
Location: Singapore

PostPosted: Wed Apr 30, 2008 5:25 pm    Post subject: Reply with quote  Mark this post and the followings unread

Wow...they appeared #Tongue

_________________
Please, read the signature rules of the forum.

Back to top
View user's profile Send private message Skype Account
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [13 Posts] Mark the topic unread ::  View previous topic :: View next topic
:  
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1887s ][ Queries: 14 (0.0141s) ][ Debug on ]