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 Thu Apr 18, 2024 11:47 pm
All times are UTC + 0
I figured out how to add new overalys to the game
Moderators: Global Moderators
Post new topic   Reply to topic Page 1 of 1 [5 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
jonwil
Rocket Infantry


Joined: 24 Jul 2005

PostPosted: Tue Jul 21, 2020 2:41 pm    Post subject:  I figured out how to add new overalys to the game Reply with quote  Mark this post and the followings unread

In light of the attempts by Oofjay to get new overlays working in-game I decided to start from scratch and do my own attempt at getting new overlays working.
Attached is my TD mod plus the source changes I have.
If you have a TD map that references the overlay bti1, it will make that tile (wherever its placed) turn into "blue tiberium". This will look like an upside-down version of regular tiberium in the remaster graphics mode and like regular tiberium in the classic graphics mode. When harvested it will give 2x the value of regular tiberium.

What I changed in the source code:
1.Update CellClass::Tiberium_Adjust in cell.cpp to correctly choose blue tiberium instead of regular tiberium.
2.Add new blue tiberium defines to OverlayType in defines.h
3.Update DLLExportClass::Cell_Class_Draw_It in dllinterface.cpp so it classifies blue tiberium as a resource
4.Update DLLExportClass::Debug_Heal_Unit in dllinterface.cpp to correctly choose blue tiberium instead of regular tiberium.
5.Update MapClass::Logic in map.cpp to correctly choose blue tiberium instead of regular tiberium.
6.Add new overlay data to ODATA.CPP
7.Add code to init.cpp to load a mod.mix file
8.Change UnitClass::Harvesting so that it will give 2x the amount of tiberium when harvesting blue tiberium.

Other changes in the mod:
1.Create mod.mix containing the necessary classic-mode shp files.
2.Add the necessary entries to TD_TERRAIN_DESERT.XML, TD_TERRAIN_TEMPERATE.XML and TD_TERRAIN_WINTER.XML.
and 3.Create the remaster-mode graphics by taking the existing tiberium artwork, renaming it and flipping it upside-down.

It seems that new overlay types need classic shp files or they wont draw any graphics (even in remaster mode) and those shp files have to live in a .mix file and not loose.

I hope this helps someone out.



TiberiumTest.7z
 Description:

Download
 Filename:  TiberiumTest.7z
 Filesize:  1.7 MB
 Downloaded:  14 Time(s)


Back to top
View user's profile Send private message
Oofjay
Civilian


Joined: 15 Jul 2020

PostPosted: Tue Jul 21, 2020 8:27 pm    Post subject: Reply with quote  Mark this post and the followings unread

Sorry to bother again, but I still cannot get the art to show up Razz

I haven't implemented the tiberium logic yet, so I've classed the BTIB tiles as walls for now. No matter what I do, they're invisible. Perhaps also a good idea to look into this if I ever want to make new wall tiles or something.

I've included my code files below. Odd thing is, when I stick your tiberiandawn.dll in my mod file, it works perfectly, so it's not the art that's wrong. However, I just cannot replicate adding a new overlay.



bluetib.zip
 Description:

Download
 Filename:  bluetib.zip
 Filesize:  33.02 KB
 Downloaded:  7 Time(s)


Back to top
View user's profile Send private message
jonwil
Rocket Infantry


Joined: 24 Jul 2005

PostPosted: Tue Jul 21, 2020 9:40 pm    Post subject: Reply with quote  Mark this post and the followings unread

I dont have any idea what might be going wrong, your code looks OK to me.

Back to top
View user's profile Send private message
Oofjay
Civilian


Joined: 15 Jul 2020

PostPosted: Tue Jul 21, 2020 10:05 pm    Post subject: Reply with quote  Mark this post and the followings unread

Got it - the walls were not theater specific, and all the art was sorted by specific theaters. I set "theater specific" to true and the damn thing finally shows up!

Now I'll work on all the logic and aesthetics for the blue tiberium. Thanks a lot for all the help!

Back to top
View user's profile Send private message
jonwil
Rocket Infantry


Joined: 24 Jul 2005

PostPosted: Tue Jul 21, 2020 11:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

Take a look at my code (and the "What I changed in the source code") to see the places you will need to change.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [5 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
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
You can post new topics in this forum
You can 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.1782s ][ Queries: 13 (0.0092s) ][ Debug on ]