Level Editing: Scripting

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: prospero, Ade

User avatar
Trinitron
Dragon
Posts: 307
Joined: Sat Jul 12, 2008 5:53 pm
Location: Russia

Post by Trinitron »

I ran all map on 10 thousand times - anywhere it is not present, in general does not appear anywhere. At you it appeared? Where it should appears? Judging by co-ordinates in that place where descent begins. It is not present.

Can correct it?

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

Post by prospero »

Are you using the same .bw file? If you have made another the spawn positions will need changing.

In DefFuncs.py lok for this:

Code: Select all

enemyspawnpos["VMBlackKnight"]=  [(21298,-1114,-16140),
			         (2706,-1113,20651),
                                 (18954,-1115,8102),
                                 (15000,-1114,-8669),
                                 (-8860,-1115,-5444)]
btw. If you press the 'I' key, the Player's current position is written to a file Pos.txt in the map folder. Very useful. [;)]

User avatar
Trinitron
Dragon
Posts: 307
Joined: Sat Jul 12, 2008 5:53 pm
Location: Russia

Post by Trinitron »

I did not change map, started that, that you have sent to me.

Code: Select all

def WritePos():
	char=Bladex.GetEntity("Player1")
	x=int(char.Position[0])
	y=int(char.Position[1])
	z=int(char.Position[2])
	file = open("../../BODLoader/Mods/TMap_test/pos.txt","a")
        file.write("("+str(x)+","+str(y)+","+str(z)+")"+"\n")
        file.close()

Here only at me the file pos.txt is not present.
And when I press key "I" - occurs nothing.[B)]

User avatar
Trinitron
Dragon
Posts: 307
Joined: Sat Jul 12, 2008 5:53 pm
Location: Russia

Post by Trinitron »

prospero.

There can be you have laid out not the final version a fashion of mine?

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

Post by prospero »

Sorry Trinitron....
........catching up.[:)]

Can't think what might be wrong. I played the map with Knight and Amazon up to level 20. No problems. The version I sent came straight out of my BODLoader/Mods.

Now is your chance to sharpen your de-bugging skills.[:D]

User avatar
Trinitron
Dragon
Posts: 307
Joined: Sat Jul 12, 2008 5:53 pm
Location: Russia

Post by Trinitron »

Hi prospero.[8)]

Arrrrr.................[}:)]

I will try, as I will definitively move on new apartment.[xx(]

User avatar
Trinitron
Dragon
Posts: 307
Joined: Sat Jul 12, 2008 5:53 pm
Location: Russia

Post by Trinitron »

It's work![:D]

Image

User avatar
Trinitron
Dragon
Posts: 307
Joined: Sat Jul 12, 2008 5:53 pm
Location: Russia

Post by Trinitron »

Greetings.

I know what to add a subject and then it it is successful to save, it is necessary there is on distance of 10 metres (maximum). Whether there is other way what to save objs if it is too highly from the earth where you stand?

And that, each time to put new sectors what to add objs, then them to delete.

User avatar
Tomash
Dragon
Posts: 248
Joined: Sat Oct 25, 2008 11:23 am
Location: Russia
Contact:

Post by Tomash »

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

Greetings.

I know what to add a subject and then it it is successful to save, it is necessary there is on distance of 10 metres (maximum). Whether there is other way what to save objs if it is too highly from the earth where you stand?
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">

To make the distant objects you can just use the coords from LED. But remember:
LED Scripts
x 1000x
z -1000z
y -1000y

If you need exact orientation of an object it's better way to use EBrowser. Write in DefFuncs:

def PrintPos(entityname):
o=Bladex.GetEntity(entityname)
print "===>>>"
print entityname; print o.Position; print o.Orientation


Then locate your object with EBrowser and then put in console:

PrintPos(NameOfYourObject_that_you_can_copy_from_EBrowser's_window)

And you will see position and orientation of this object

# You can modify this script to make it write strings in special file(like EBrowser do :D)


And also sometimes I use following way:

I create a solid object with EBrowser(f.e. "LapidaBarbaro"),then I put Hero on it and use this object as elevator or "flying

mat" to reach the roofs and sky or bottom of a deep gap. It's fun and useful :D:D:D

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">
And that, each time to put new sectors what to add objs, then them to delete.
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">
What did you mean?

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

Post by prospero »

Not too sure of your question Trintron. Do you mean placing objects with The EBrowser?

You can extend the selection range (default 6 metres) by typing in a new value in the box and pressing Enter. To get a better veiw, use the free camera.

User avatar
Trinitron
Dragon
Posts: 307
Joined: Sat Jul 12, 2008 5:53 pm
Location: Russia

Post by Trinitron »

Hi Tomash, hi Prospero.

Tomash, RRRRRRRRRRRRRRR, translate, translate...[B)]

Yes Prospero, I have placed objects through EBrowser, saved separately each object, all OK.
Now I wish to hang up a flag in the big high room. I load through EBrowser Tabrizo, I put it under a room ceiling. It does not save, as is too high from the character.

Whether there is any other way what it would be possible to save easily objects which far from the character (highly)? For to do new sector which would allow the character to be opposite to the FLAG which is attached to a ceiling. And so it to do each time.
(I also had it in view of Tomash.[:D])

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

Post by prospero »

Increase the setting in the box highlighted and press Enter.

Image

Sometimes you have to close/open again the EB to do this.

You can create a temporary elevator with an object such as PlataformaRail and hoist the player up to the desired hight.
Just don't fall off.[;)]

User avatar
Trinitron
Dragon
Posts: 307
Joined: Sat Jul 12, 2008 5:53 pm
Location: Russia

Post by Trinitron »

Yes![:p]

That that is necessary, I really did not know about it and never would guess, very conveniently.[:D][|)][:D][:D]

Thanks you Prospero.[8)]

btw. Prospero, check your email.

User avatar
Trinitron
Dragon
Posts: 307
Joined: Sat Jul 12, 2008 5:53 pm
Location: Russia

Post by Trinitron »

Hi seigneur Prospero.[8)]

Can be you write separate tut on creation widegets? As it is not an easy material, I think that you could open all its secrets or at least a part from them. I wish to try to create a separate window at the top of the screen that in this window it would be possible to switch buttons. Using keyboard keys, it was possible to switch buttons in this window on the screen. For this purpose it is necessary to know widgets, but it difficult. In tuta for a python the section widgets is written vaguely.[:I]

And one more, you can explain as to create new textures for new characters? For example, I wish to create a new texture for one of characters. I do not know as to do absolutely new texture and in what position to put new textures in a mmp file.

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

Post by prospero »

Sorry folks if I have been a bit absent lately. (Busybusybusy.[:p])

Trintron. I'll do a little tut on widgets. It's complicated and there is some parts that are a mystery to me, but I'll tell what I know. (if I can remember how to do it)

I'll do a tut for new textures as well.

Stay tuned...........

Post Reply