ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
How to add map spots of level changers of a mod

Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  19:58:35  2 January 2013
profilee-mailreply Message URLTo the Top
olivius74
Senior Resident
 

 
On forum: 11/19/2010
 

Message edited by:
olivius74
01/02/2013 20:00:07
Messages: 1991
How to add map spots of level changers of a mod

Hello

Would it be possible the see the level changers of a mod in the map,
but without open the all.spawn and search in it.

I look and scan all the scripts of an unpack game of SoC,
but only found about levels changers in

bind_stalker.script
level_task.script

And not the function se_level_changer like in CoP.

But function add_lchanger_location() in level_task.script.

Can I had a local pos = self.position somewhere in a script ?and which?

So to be clear,how to add map spots of level changers of a mod?

Thank's for a help.
  20:17:04  2 January 2013
profilee-mailreply Message URLTo the Top
xRatx
Senior Resident
 

 
On forum: 06/18/2008
 

Message edited by:
xRatx
01/02/2013 20:20:44
Messages: 1592
As far I remenber, to add a level_changer spot you need to edit level_tasks.script .

Let me see, you need the level_changer story_id (check all.spawn for story_id since it can be more helpfull to find it)

Go to function add_lchanger_location() and add this for your "level_changer"

		local obj = sim:story_object(put here your level changer story_id)
		if obj then
			level.map_add_object_spot(obj.id, "level_changer", "put where to the level_changer is pointed, e.g.: to_garbage")
		end


So it does looks like this:


function add_lchanger_location()
	local sim = alife()
	if sim then
		-- escape
		local obj = sim:story_object(91)
		if obj then
			level.map_add_object_spot(obj.id, "level_changer", "to_garbage")
		end

...
...
		-- YOUR NEW LEVEL CHANGER
		
		obj = sim:story_object(6000)
		if obj then
			level.map_add_object_spot(obj.id, "level_changer", "to_aes")
		end
		

	end
end 



I removed some lines from the code to provide this as example and to not spam the whole page with code
  22:18:30  2 January 2013
profilee-mailreply Message URLTo the Top
olivius74
Senior Resident
 

 
On forum: 11/19/2010
 

Message edited by:
olivius74
01/02/2013 22:20:45
Messages: 1991
Thank you for your answer!

I saw the number the level_changer story_id in the game_story_ids.ltx:

091 = "esc_exit_to_garbage_01" line 38
or
195 = "gar_exit_to_darkvalley_low".

I have now the correct level_tasks.script.

And I see on the map all level changers:

http://i.imgur.com/Uao3I.jpg

http://i.imgur.com/SVUW3.jpg

Many thank's to you !

May I ask you an ultimate question,please?But I don't want to bother you... twice!

In this mod (due the white on the map) ,the marker are not very visible.

So do you know where exactly I can change the color of the symbol ?

Alundiao indicate me the file : map_spots.xml

I search line "level" and find :

<level_map_spot_border x="0" y="0" width="36" height="36" alignment="c" stretch="1">
<texture x="728" y="576" width="51" height="51" r="200" g="200" b="200">ui\ui_common</texture>
<texture_bk x="633" y="693" width="32" height="32" r="255" g="100" b="0">ui\ui_common</texture_bk>
</level_map_spot_border>

<mini_map_spot_border x="0" y="0" width="18" height="18" alignment="c" stretch="1">
<texture x="728" y="576" width="51" height="51" r="200" g="200" b="200">ui\ui_common</texture>
<texture_bk x="501" y="944" width="15" height="15" r="255" g="100" b="0">ui\ui_common</texture_bk>
</mini_map_spot_border>

r="255" g="100" b="0" for orange color not work ?
May be other lines needed?

How can I change the color or size of the mark of a levels changer?
  01:31:08  5 January 2013
profilee-mailreply Message URLTo the Top
olivius74
Senior Resident
 

 
On forum: 11/19/2010
Messages: 1991
So ,sorry but no tip to change the color of a level changer?

  04:06:18  5 January 2013
profilee-mailreply Message URLTo the Top
NatVac
Senior Resident
 

 
On forum: 06/15/2007
Messages: 4302
It's a texture. The color info is superfluous; maybe it was intended for a future engine modification.

The level changer 'texture' is found in gamedata\textures\ui\ui_common.dds in the extracted database. It is at coordinates 728, 576, size 51x51. You want to change that color? Change that file image section with a paint program that works with DDS files.

You can have custom images. Just point to them after adding them to the blank spots in the file.
  10:56:20  5 January 2013
profilee-mailreply Message URLTo the Top
olivius74
Senior Resident
 

 
On forum: 11/19/2010
 

Message edited by:
olivius74
01/05/2013 10:58:21
Messages: 1991
Wow,thank you very much, Sir !

I don't know that,how I saw the code RGB I thought it was here!

http://i.imgur.com/fXHQu.jpg

Now,go to the paint tools and little pencil!

And I will try you say,change the model of image.

Cheers
 
Each word should be at least 3 characters long.
Search:    
Search conditions:    - spaces as AND    - spaces as OR   
 
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
 

All short dates are in Month-Day-Year format.


 

Copyright © 1995-2021 GSC Game World. All rights reserved.
This site is best viewed in Internet Explorer 4.xx and up and Javascript enabled. Webmaster.
Opera Software products are not supported.
If any problem concerning the site functioning under Opera Software appears apply
to Opera Software technical support service.