Fish Questions [Solved]

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
Sky_216
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2086
Joined: Mon Feb 13, 2006 3:28 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Fish Questions [Solved]

Post by Sky_216 »

OK, a few questions about fish in maps.

1) what controls where the fish are placed? I know you spawn them with the lua, but how do you determine where they go????

2) Do fish use a mesh file at all?

3) Can you use higher resolution images for fish? Because 128 x 128 is a bit small, I wanted some bigger ones (require higher resolution). Any way to do this?
User avatar
Frisbeetarian
Jedi
Jedi
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

Re: Fish Questions

Post by Frisbeetarian »

Using the file searcher of Zerted's, the word fish only shows up in the map scripts for 3 worlds and in each of their REQs. The commands used in each of the Lua scripts aren't defined in any other Lua script, which I would take to mean that they are hard coded.

As to where they go, they probably just go in where ever there's water. As to a msh file, it doesn't look like they use one. The way that they are included in the game so that the map script can read them is by the REQ file, and each time, the fish are referred to in the REQ as a texture.

As to your last question, I wasn't too sure what you meant. Do you mean can you use a larger texture? I would guess so, though I haven't tested it, so I don't know for sure. Or do you mean can you have larger fish? I don't know this one, though I'd guess so as well, just play around with the parameters on SetFishType (you can have more than one type, and thus different size fish).
Caleb1117
2008 Most Original Avatar
Posts: 3096
Joined: Sun Aug 20, 2006 5:55 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set
Location: X-Fire: caleb1117 ಠ_ಠ

Re: Fish Questions

Post by Caleb1117 »

1. Yes, everywhere there is water, no way to restict it so far as I know.

2. Yes, it's just a texture.

3. You could try. Making the texture bigger may increase the size of the fish, or you might just end up with a high res fish. If the image size doesn't affect the size of the fish ingame then there probably is no way to change the physical size.
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Re: Fish Questions

Post by FragMe! »

As posted in your WIP

This is truley looking good.
Oh for fishes have a look at Dagoba or Yavin both have them
They are in two places, the Req

Code: Select all

 REQN
   {
      "texture"
      "dag1_map"
      "bird"
      "bird2"
      "leaf"
      "fish"
   }

and the LUA

Code: Select all

     --  Fishies
     SetNumFishTypes(1)
     SetFishType(0,0.8,"fish")
     

     SetMaxFlyHeight(20)
     SetMaxPlayerFlyHeight (20)
I think the two numbers in the lua might be, depth below water and scale (lol fish scale) it has been a while since I played with them and turned the fish into rats.

Oh and don't forget the texture, I did and had a bunch of white squares swimming around
User avatar
Sky_216
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2086
Joined: Mon Feb 13, 2006 3:28 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: Fish Questions

Post by Sky_216 »

Thanks for the help guys! Worked perfectly! I've only done textures with power of two (128, 256, 512) but they all support fish. Effect resolution, not size. The second value in the lua is size, no idea what the first one is.

Oh and these need some work but...

Image
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

My theory on fish values in the LUA

Post by AceMastermind »

Code: Select all

     --  Fishies
     SetNumFishTypes(1)
     SetFishType(0,0.8,"fish") 
Since I don't use fish my theory on the above lines/values is this:

Code: Select all

SetNumFishTypes([how many types]) -- 3 types max?
SetFishType([type #],[scale],"texture") -- the first type starts at 0(zero), second is 1, third is 2
Example using 3 types of fish:

Code: Select all

SetNumFishTypes(3)
SetFishType(0,0.8,"fish")
SetFishType(1,0.8,"anotherfish")
SetFishType(2,0.8,"andyetanotherfish")
:)
User avatar
Sky_216
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2086
Joined: Mon Feb 13, 2006 3:28 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: Fish Questions

Post by Sky_216 »

Yep ace, you're right. The first numbers must have at least 1 in between them (eg can be 0.5, 1.5, 2.5) to get all the fish to work. The second is the scale, the last is the texture.

Fish are sorta 3d. The two sides of the texture are angle into a vaguely 3d shape (the shape of the stock fish). However, there are flat bits at the bottom and top, so using these I created these:
Image
Only in CTF mode in my map. They're sea garfish ( a real species).
obiboba3po
2008 Most Technically Challenging Avatar
Posts: 2376
Joined: Tue Feb 12, 2008 7:46 pm
Projects :: No Mod project currently.
Games I'm Playing :: League of Legends
xbox live or psn: No gamertag set
Location: NJ, USA

Re: Fish Questions

Post by obiboba3po »

this is really useful :yes: bookmarking this :thumbs:
Post Reply