Carnivores CE
Would you like to react to this message? Create an account in a few clicks or log in to continue.

RSC Overriding via Script

2 posters

Go down

RSC Overriding via Script Empty RSC Overriding via Script

Post  Adelphospro Thu Dec 11, 2008 2:48 am

Hey everyone!
I have finally worked out a system that enables the user to override different aspects of the RSC file. Eventually, there will be no need for an rsc file.
ATM, there are two things you can override:
Textures and water.

The system looks like this:

Before loading anything, the game loads the map's ini file (located where the .map file is). This is a LUA script that controls simple things like what types of dinos appear on the map, debug mode, heightmap scale, and such, but there is also a new variable: rscscript = "scriptfile".
After the game loads the rsc file, it checks if this value is set, and if it is it attempts to load the file listed.
Here is an example ini file:
Code:

PrintLog("Area1.lua loaded\n")
SnowMode = 0
type1 = "all"
type2 = "player"
ambients = 15
softambients = 9
MapScale = 64
rscscript = "data\\maps\\area1\\overrides.mapres"
As you can see, the game will load 'data\maps\area1\overrides.mapres'.
A mapres file is simply a script file that looks like the normal res file (I call it CarnScript).
Here is an example mapres file in that directory:
Code:

water {
{
waterIndex$ = 0
textureIndex$ = 5
trans$ = 50
fogcolor$ = 11000000
}
}
textures {
{
textureIndex$ = 5
file$ = 'data\maps\area1\textures\tex1.tga'
}
}
.
As you can see, you can override a few things!
Notice that there is no height value here for the water.
You can have one (height$ = 99), but not including it will simply leave the height at its current one (which is what I want, otherwise the water is WAY above or below where it should be).
Also notice that I changed the water texture to index 5, then loaded a new texture for index 5.
The tga images are the ones that Machf's tool exports (can also be a bmp that machf's tool exports)

Up next is sound overrides, sky image overrides, fog overrides, and eventually object overrides (will use object files exported by machf's tool)
Adelphospro
Adelphospro
Admin
Admin

Male Number of posts : 157
Age : 33
Location : South Carolina - United States
Reputation : 1
Registration date : 2008-11-28

Dinosaur
Name: Bob
Health:
RSC Overriding via Script Left_bar_bleue0/0RSC Overriding via Script Empty_bar_bleue  (0/0)
Species: Tyrannosaurus rex

http://www.adelphospro.com

Back to top Go down

RSC Overriding via Script Empty Re: RSC Overriding via Script

Post  red7204 Wed Feb 17, 2010 7:43 pm

I added a thread in another section, but I thought I would add it here since it has to do with this thread. Where can I find more variables like the random dinosaurs that spawn along with the number of dinosaurs. Can an RSC file be extracted, or what is the best way to open it. Also is there a way to overide the values on the equipment, I would like to override the some of the equipment values. Also what file do I open to find most of the program data. I tried opening the area files with notepad ++ but not much luck. I was also wondering how to convert .car files so that they could be opened in Photoshop. If not what is the best program to edit the textures with. Thanks for this thread.



I just started playing carnivores again and thought about modding it. I looked up how to mod Carnivores 2 and other mods for it (extreme mod and Community edition). I have some experience with modding meshes and texture files. I looked over the directory and found the RES file and how to make changes to it with the weapons, dinosaurs.

But other than that I don't know anything about CAR files or RSC files other than their online definitions, an Archiver file and Rescource file. I Downloaded the Extreme Mod which has a CAR editor, and a few other tools from the forums like the 3dfx plugin.

My questions are how do I edit the areas, for example changing the number of dinosaurs for each location, the random dinosaurs and their numbers, editing the values of the equipment, and changing the running speed. Did not find anything in the RES file for this. I plan to look over the folder again, to see what I can find but any help would be appreciated.

I downloaded notepad ++ and looked at the files but no luck. I also have a hex editor but not much luck opening files with it. It crashed a few times, not sure if it is the hex editor or the files themselves.

I think Carnivores has loads of potential and think certain changes would make it even greater, despite how old it is. I like the mods added btw, like the extreme mod.

Unfortunately the software/direct 3d shows its age, I have windows 7 and have a few glitches with the water and the screen. But I also have DGvoodoo 1.30, 1.50 beta 1 and 2 for the 3dfx glide and it works well with it except a few lags. If anyone wants a copy of dgvoodoo, I have them on my computer. The guns look much nicer with 3dfx glide as well.

Thanks for any help!!

red7204
Moshops
Moshops

Number of posts : 5
Reputation : 0
Registration date : 2010-02-17

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum