Old 09-14-2008   #1 (permalink)
Advanced Member
 
Bobsymalone's Avatar
 

Join Date: Jul 2008
Posts: 340
Bobsymalone is on a distinguished road
Default Screen model replacement.

EDIT: Non-CS plasmas and fixed oscilloscope!



Okay, I thought I best move this to the Lua coding forum.

I'm trying to change the CS plasma screen model to the PHX plasma screen model for various wire screens. The "big" wire screen is pretty small.

Here's one problem:
http://www.wiremod.com/forum/58848-post12.html

Another problem is with the normal screens (the ones that just show a value), I can't find where the models part of the code is.

Code:
local MaxTextLength = 20
function TOOL.BuildCPanel(panel)
	WireToolHelpers.MakePresetControl(panel, "wire_screen")
	
	panel:AddControl("ComboBox", {
		Label = "#WireThrusterTool_Model",
		Options = {
			["#Small tv"]		= { wire_screen_model = "models/props_lab/monitor01b.mdl" },
			["#Plasma tv"]		= { wire_screen_model = "models/prop_phx/sp_screen.mdl" },
			["#LCD monitor"]	= { wire_screen_model = "models/props/cs_office/computer_monitor.mdl" },
			["#Monitor Big"]	= { wire_screen_model = "models/kobilica/wiremonitorbig.mdl" },
			["#Monitor Small"]	= { wire_screen_model = "models/kobilica/wiremonitorsmall.mdl" },
		}
	})

	panel:AddControl( "PropSelect", {
		Label = "#WireThrusterTool_Model",
		ConVar = "wire_screen_model",
		Category = "",
		Models = list.Get( "WireScreenModels" ),
		Height = 2
	})
The bit listing all the different models for screens is just for the model selection menu in the tool menu I think. I think the models that are spawned are in the list "WireScreenModels".

Code:
	panel:AddControl( "PropSelect", {
		Label = "#WireThrusterTool_Model",
		ConVar = "wire_screen_model",
		Category = "",
		Models = list.Get( "WireScreenModels" ),
		Height = 2
	})
That bit. Would appreciate help.

Last edited by Bobsymalone; 09-20-2008 at 07:53 PM..
Bobsymalone is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 09-16-2008   #2 (permalink)
COMPLETE BLOODY BASTARD

 
AzraelUK's Avatar
 

Join Date: Aug 2007
Location: Camelot, it is a silly place.
Posts: 583
AzraelUK is on a distinguished road
Send a message via MSN to AzraelUK
Default Re: Screen model replacement.

You'd have to do call list.Set to add your new screen to the WireScreenModels list. And then you'd have to worry about the sizes, etc., but I'm sure you'll figure it out.
__________________
A designer knows he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away.
—Antoine De Saint-Exupery
AzraelUK is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-16-2008   #3 (permalink)
Advanced Member
 
Bobsymalone's Avatar
 

Join Date: Jul 2008
Posts: 340
Bobsymalone is on a distinguished road
Default Re: Screen model replacement.

Quote:
Originally Posted by AzraelUK View Post
You'd have to do call list.Set to add your new screen to the WireScreenModels list. And then you'd have to worry about the sizes, etc., but I'm sure you'll figure it out.
Well according to somebody on the old ideas thread, the PHX plasma screen is the same model as from CS:S, so sizes shouldn't be a problem. Offset is though. Hm.
I'll have to check list.Set on the Wiki. Thanks!

EDIT: Actually, it'd probably be more useful to know where the WireScreenModels list is kept. I haven't been able to find it.

Last edited by Bobsymalone; 09-16-2008 at 03:45 PM..
Bobsymalone is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-20-2008   #4 (permalink)
COMPLETE BLOODY BASTARD

 
AzraelUK's Avatar
 

Join Date: Aug 2007
Location: Camelot, it is a silly place.
Posts: 583
AzraelUK is on a distinguished road
Send a message via MSN to AzraelUK
Post Re: Screen model replacement.

Quote:
Originally Posted by Bobsymalone View Post
EDIT: Actually, it'd probably be more useful to know where the WireScreenModels list is kept. I haven't been able to find it.
wire\lua\autorun\client\cl_modelplug.lua:25
Code:
//screens
list.Set( "WireScreenModels", "models/props_lab/monitor01b.mdl", {} )
list.Set( "WireScreenModels", "models/props/cs_office/TV_plasma.mdl", {} )
list.Set( "WireScreenModels", "models/props/cs_office/computer_monitor.mdl", {} )
list.Set( "WireScreenModels", "models/kobilica/wiremonitorbig.mdl", {} )
list.Set( "WireScreenModels", "models/kobilica/wiremonitorsmall.mdl", {} )
wire\lua\entities\gmod_wire_screen\cl_init.lua:28
Code:
	if self.Entity:GetModel() == "models/props_lab/monitor01b.mdl" then
		OF = 6.53
		OU = 0
		OR = 0
		Res = 0.05
	elseif self.Entity:GetModel() == "models/kobilica/wiremonitorsmall.mdl" then
		OF = 0.2
		OU = 4.5
		OR = -0.85
		Res = 0.045
	elseif self.Entity:GetModel() == "models/kobilica/wiremonitorbig.mdl" then
		OF = 0.3
		OU = 11.8
		OR = -2.35
		Res = 0.12
	elseif self.Entity:GetModel() == "models/props/cs_office/computer_monitor.mdl" then
		OF = 3.25
		OU = 15.85
		OR = -2.2
		Res = 0.085
		RatioX = 0.75
	elseif self.Entity:GetModel() == "models/props/cs_office/TV_plasma.mdl" then
		OF = 6.1
		OU = 17.05
		OR = -5.99
		Res = 0.175
		RatioX = 0.57
	end
__________________
A designer knows he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away.
—Antoine De Saint-Exupery
AzraelUK is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-20-2008   #5 (permalink)
Advanced Member
 
Bobsymalone's Avatar
 

Join Date: Jul 2008
Posts: 340
Bobsymalone is on a distinguished road
Default Re: Screen model replacement.

Quote:
Originally Posted by AzraelUK View Post
*Code*
Thanks, that first bit was what I couldn't find.

Last edited by Bobsymalone; 09-20-2008 at 02:39 PM..
Bobsymalone is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -7. The time now is 12:33 AM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.

Page top