ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
Changing Loadscreen

« Previous 10 events | 1 2 3 4 | Next 10 events »| All Messages
Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  09:46:00  2 November 2011
profilee-mailreply Message URLTo the Top
Meltac
messing with code
(Resident)

 

 
On forum: 01/21/2010
Messages: 1519

---QUOTATION---
I don't know how to use the FS functions. I tried to copy with this function:
- getFS():file_copy(string, string)
Someone knows how to use this function?

---END QUOTATION---



I had problems with those file functions as well. I'm even not sure whether all of them work at all.

What path did you have to provide to get the delete working? Maybe it's also some path-related problem with the copy function?

Some kind of tutorial would be helpful here...
  10:03:48  2 November 2011
profilee-mailreply Message URLTo the Top
SetaKat
Ex modder, Zones only ferret and will someday release a game
(Resident)

 

 
On forum: 02/20/2010
Messages: 6342
I'm not to sure, but try this.
local fs = getFS()
local tex_dir = fs:update_path("$game_textures$", "")
fs:file_delete(tex_dir + "ui\\","ui_load.dds")
fs:file_copy(tex_dir + "ui\\new_load.dds", tex_dir + "ui\\ui_load.dds")

  18:38:37  3 November 2011
profilee-mailreply Message URLTo the Top
ThunderFreak
Senior Resident
 

 
On forum: 08/07/2009
 

Message edited by:
ThunderFreak
11/03/2011 18:40:00
Messages: 685
@Meltac: getFS():file_delete("$game_textures$","ui\\ui_load.dds" is working and deleting the default load screen texture.
But to copy the new texture as ui_load.dds I got stuck.

@fluffy: To use the update_path function is a good idea. Never tried. I always tried with the get_path function. But this function lead to CtD.
I will try this.
But what I can see is, you are using (+) to concatenate the strings and not the usual (..) like it should be. Is there a special reason?
  21:40:31  3 November 2011
profilee-mailreply Message URLTo the Top
ThunderFreak
Senior Resident
 

 
On forum: 08/07/2009
Messages: 685
@fluffy22: You made my day. It's working now. Thanks, fluffy.
  23:47:27  3 November 2011
profilee-mailreply Message URLTo the Top
SetaKat
Ex modder, Zones only ferret and will someday release a game
(Resident)

 

 
On forum: 02/20/2010
Messages: 6342
I've spent too much time in Java and C#, and not enough time in LUA recently.
  02:03:15  4 November 2011
profilee-mailreply Message URLTo the Top
Lijenstina
Doom metal in the shade of the flying radiators
(Resident)

 

 
On forum: 07/23/2005
Messages: 1902
That is great news.
Could it be done to pick up them at random?
  02:09:44  4 November 2011
profilee-mailreply Message URLTo the Top
SetaKat
Ex modder, Zones only ferret and will someday release a game
(Resident)

 

 
On forum: 02/20/2010
Messages: 6342
Yep, just have a bunch of ui_load#.dds textures, pick a number at random, check to see if the file exists (there is an fs function for this), and if it does, delete the existing file, and copy the new one. Else try again.
  12:04:52  4 November 2011
profilee-mailreply Message URLTo the Top
Lijenstina
Doom metal in the shade of the flying radiators
(Resident)

 

 
On forum: 07/23/2005
 

Message edited by:
Lijenstina
11/04/2011 12:15:15
Messages: 1902
NLC 6 seems to have a load screen related script.


--' Script dim_loadscreens.script

local f = getFS()

--[Полный рандом, не зависящий от имени]--
function fullscreen_loadscreen()
	local flist = f:file_list_open("$game_textures$","ui\\load\\",FS.FS_ListFiles)
	local f_cnt = flist:Size()
	if f_cnt > 0 then
		local rnd=math.random(1,f_cnt)
		local file_name = flist:GetAt(rnd)
		local texture = f:update_path("$game_textures$","ui\\ui_load.dds")
		local name = f:update_path("$game_textures$","ui\\load\\"..file_name)
		f:file_delete(texture)
		f:file_copy(name, texture)
	end 
end




Edit :It works. I'll try to add a widescreen check so it will pick up a ws version.
  18:43:52  4 November 2011
profilee-mailreply Message URLTo the Top
ThunderFreak
Senior Resident
 

 
On forum: 08/07/2009
Messages: 685
... and this is my code.


	local screens = {ui_load1.dds,ui_load2.dds,ui_load3.dds}
                local nr = #screens
	if nr <= 1 or nr == nil then return end
	local chg_ls = screens[math.random(nr)]
	local f = getFS()
	local fn = "ui\\ui_load.dds"
	local up = f:update_path("$game_textures$","")
	f:file_delete("$game_textures$", fn)
	f:file_copy(up.."ui\\"..chg_ls, up..fn)


I put the function call in the ui_main_menu.script file and in this function the change is executed 'function main_menu:__init() super()'. It is the first statement there.
  19:33:47  4 November 2011
profilee-mailreply Message URLTo the Top
LoNer1
Настоящий Cталкер, Русская Версия
(Resident)

 

 
On forum: 10/23/2009
Messages: 1890

---QUOTATION---
... and this is my code.


	local screens = {ui_load1.dds,ui_load2.dds,ui_load3.dds}
                local nr = #screens
	if nr <= 1 or nr == nil then return end
	local chg_ls = screens[math.random(nr)]
	local f = getFS()
	local fn = "ui\\ui_load.dds"
	local up = f:update_path("$game_textures$","")
	f:file_delete("$game_textures$", fn)
	f:file_copy(up.."ui\\"..chg_ls, up..fn)


I put the function call in the ui_main_menu.script file and in this function the change is executed 'function main_menu:__init() super()'. It is the first statement there.
---END QUOTATION---



After looking at your code, you really meant a different loading screen, not the little screens in the middle, but an actual total different file...sorry, my bad, and this really is new and awesome! i love modding and modders
 
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.