Blade TV

Talk about Severance Blade of Darkness modifications and maps here. No tips or tech support questions please, use the forum above. Note that the game is rated 18 so some content may be unsuitable for younger readers.

Moderators: Ade, prospero

Sir Random
Dragon
Posts: 737
Joined: Thu Nov 15, 2001 12:58 am
Location: Ireland
Contact:

Blade TV

Postby Sir Random » Fri Apr 15, 2011 3:48 am


User avatar
prospero
Ancient Dragon
Posts: 1728
Joined: Wed Nov 21, 2001 1:42 am
Location: United Kingdom

Postby prospero » Fri Apr 15, 2011 4:18 am

HTF did you do that? [:D][8D][8)][:0]

Sir Random
Dragon
Posts: 737
Joined: Thu Nov 15, 2001 12:58 am
Location: Ireland
Contact:

Postby Sir Random » Fri Apr 15, 2011 4:50 am

I've been poking around, and I discovered some built-in funcs that allow you to manipulate map textures through scripts [:)].

You can change any surface texture with:

sec=Bladex.GetSector(x,y,z)
sec.SetSurfaceTexture(<font color="green">surface</font id="green">,"texturename")

values for <font color="green">surface</font id="green"> should be:
0 = floor
1 = ceiling
2,3,4,... walls


You can stretch textures in X or Y axis with:

sec.SetSurfaceTextureZoomX(<font color="green">surface</font id="green">,<font color="red">zoomfactor</font id="red">)
sec.SetSurfaceTextureZoomY(<font color="green">surface</font id="green">,<font color="red">zoomfactor</font id="red">)

values for <font color="red">zoomfactor</font id="red"> should be LED_Zoom*100.0 (for a zoom of 20, use zoomfactor 2000)

These funcs can be used for some cool FX. [:D]

User avatar
mingyue1371
Dragon
Posts: 208
Joined: Fri Aug 05, 2011 4:46 pm
Location: China
Contact:

Postby mingyue1371 » Thu Mar 15, 2012 1:27 pm

Very cool effect!!![:0][:0][:0][:0]

If I want to put some movies in my map,what should I do ?

How to define the texture name? Should I transfer the movie to gif ?
I had tried to move some gif to .mmp and define the texture to the wall,But no use.So if I want to put a move (.avi or gif format ) to a wall of my map ,what should I do?

Looking forward you replies.[:D]

Sir Random
Dragon
Posts: 737
Joined: Thu Nov 15, 2001 12:58 am
Location: Ireland
Contact:

Postby Sir Random » Thu Mar 15, 2012 3:09 pm

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by mingyue1371</i>

How to define the texture name? Should I transfer the movie to gif ?<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">
Just compile your .bmp images into an mmp, like any other game mmp.

User avatar
mingyue1371
Dragon
Posts: 208
Joined: Fri Aug 05, 2011 4:46 pm
Location: China
Contact:

Postby mingyue1371 » Thu Mar 15, 2012 10:03 pm

Thx for the rapid reply,SR![:D]

I knew what you say,but what I want was an "in-game movies",just like your example in "Mines of Kelbergen",I had lots of blade movies,how to transport them to my map's wall ?[?]

As I know,*.BMP are static pics,*.GIF are dynamic pics,if I rename the dynamic *.gif to *.bmp,then compile them to .mmp,they will do not work.[:(]

So if I want to achive it ,what should I do next ?

Sir Random
Dragon
Posts: 737
Joined: Thu Nov 15, 2001 12:58 am
Location: Ireland
Contact:

Postby Sir Random » Fri Mar 16, 2012 4:15 pm

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by mingyue1371</i>

As I know,*.BMP are static pics,*.GIF are dynamic pics,if I rename the dynamic *.gif to *.bmp,then compile them to .mmp,they will do not work.[:(]<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">
Forget about GIFs, a movie is just a group of still images displayed one after another. There are no 'dynamic' images.

You must break up your movie (.AVI) into individual frames (BMPs) and then compile the frames into an mmp (you'll need 30 frames per second for smooth animation). Then you need to write a script that applies the frames to the wall one at a time with the above code (like a movie projector).

It's best to name the frames sequentially (pic1, pic2, pic3, etc) so that you can reuse the code for any sequential list of images.

User avatar
mingyue1371
Dragon
Posts: 208
Joined: Fri Aug 05, 2011 4:46 pm
Location: China
Contact:

Postby mingyue1371 » Sat Mar 17, 2012 5:58 am

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">Then you need to write a script that applies the frames to the wall one at a time with the above code (like a movie projector).

It's best to name the frames sequentially (pic1, pic2, pic3, etc) so that you can reuse the code for any sequential list of images.
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">
Thx SR very much![:D]
I used the code above and I can successfully change some sector surface texture in my map.That was great and magic ! But now I had encounter two problem[?]:
1.when I replace the texture on the wall I found that it was always not in the middle of the wall,just like below:

Image
So how to change the pic's flw to made it just in the mid of the wall ?(I poked around,and found the "SetSurfaceTextureX" func,but when I use it like this:

Code: Select all

sec.SetSurfaceTextureX(7,120) sec.SetSurfaceTextureY(7,5)
,nothing different happened.)

2.I broke a small avi about Knight's combat to hundreds of pics and named them knt1,knt2,knt3,knt4...,
how to make a script to apply them to the wall at a time like a movie projector? (Sorry for my poor python knowledge)

Sir Random
Dragon
Posts: 737
Joined: Thu Nov 15, 2001 12:58 am
Location: Ireland
Contact:

Postby Sir Random » Sat Mar 17, 2012 7:47 am

Code: Select all

def ShowMovie(moviename, numframes, frame=1): fnum=str(frame) fname=moviename+fnum sec=Bladex.GetSector(x, y, z) sec.SetSurfaceTexture(<font color="green">wallnum</font id="green">,fname) frame=frame+1 if frame > numframes: frame=1 Bladex.AddScheduledFunc(Bladex.GetTime()+0.1, ShowMovie,(moviename, numframes, frame))
Start the movie with this line:

ShowMovie( "knt", <font color="green">numframes</font id="green"> )

(<font color="green">numframes</font id="green"> is the number of frames in your movie)


You have to centre the texture in LED, sec.SetSurfaceTextureX doesn't seem to work.

User avatar
mingyue1371
Dragon
Posts: 208
Joined: Fri Aug 05, 2011 4:46 pm
Location: China
Contact:

Postby mingyue1371 » Sat Mar 17, 2012 12:38 pm

Many thx to SR,It works![:D][:D][8D]

But I still found a problem about the "In-game movie" :
As same as the texture above,It still split into two parts or four ,just like below:(a sample that split into four parts)

I tried for many times but failed to improve it to a proper position.
I want to make it like yours:

How to adjusted it to a appropriate place on the wall ?

Still,is it possible to adjust the pic to a right place without LED just like below(I feel it is perfect.) ?

Image

Thanks very much for the replies!!![^]

Sir Random
Dragon
Posts: 737
Joined: Thu Nov 15, 2001 12:58 am
Location: Ireland
Contact:

Postby Sir Random » Sat Mar 17, 2012 4:59 pm

You need a sector wall that is square, with the texture scaled to fit exactly. This is no problem in a mod, but you'll have to look around to find a wall like that in the original gane.

User avatar
mingyue1371
Dragon
Posts: 208
Joined: Fri Aug 05, 2011 4:46 pm
Location: China
Contact:

Postby mingyue1371 » Sun Mar 18, 2012 12:42 am

Thx SR[:)],I found a strange problem:

When I used the code above in my small map,everything goes well,but if I want to apply it to the origin game ,nothing happened,what's the matter?
F.g,I want to change the Knt's first room's texture with myselfs:
Image
I put the code in Deffucs :

Code: Select all

sec=Bladex.GetSector(-111000,7500,80000)#Knight first room's position sec.SetSurfaceTexture(3,"mypic") sec.SetSurfaceTextureZoomX(3,2000) sec.SetSurfaceTextureZoomY(3,2000)
Meanwhile,I put my 123.mmp file which contained mypic.bmp in ..\Maps\Ragnar_M2,and added Bitmaps -> 123.mmp to ragnar.lvl.
When restart the game, nothing has changed.Why?[I had also tried in other maps,but the reslult was disappointed,failed to change at last.]

Btw,I can difine my pic in my map,but if I want to put my knt movie in my map,is it possible to adjust the movie in a appropriate place on the wall <font color="green">in LED?</font id="green">


Return to “Severance BoD: Modding Community”

Who is online

Users browsing this forum: No registered users and 2 guests