Some Bugs in Anvil

Started by wallworm, October 17, 2015, 12:51:01 PM

Previous topic - Next topic

wallworm

There are several bugs that Joris reported to me this weekend:

* Light Brightness resets to 200 if you Reparse FGD in scene already with Light Entities

* Prop Dynamic entities attached to WWMT Proxies get reset to default when Max scene reloaded

* env_soundscape_triggerable missing properties

I am also aware of some other bugs related to exporting animated textures.

All these bugs and a whole new tool in WW will be fixed this week.

Joris Ceoen

Quote from: wallworm on October 17, 2015, 12:51:01 PM
There are several bugs that Joris reported to me this weekend:

* Light Brightness resets to 200 if you Reparse FGD in scene already with Light Entities

* Prop Dynamic entities attached to WWMT Proxies get reset to default when Max scene reloaded

* env_soundscape_triggerable missing properties

I am also aware of some other bugs related to exporting animated textures.

All these bugs and a whole new tool in WW will be fixed this week.

Great :)!

wallworm

Regarding env_soundscape_triggerable: this bug only affects WW Pro. I haven't figured out how to fix it yet in the WW Pro parser, but I know how to manually fix it. This is a temporary fix until I get the parser patched. Also, each time you reparse your FGD with WW Pro, you'll need to fix this. Once an actual fix is out, you won't need to.

Note that you must follow these instructions exactly; failure could cause WW to crash! As such, only follow these steps if you are having a problem because you need access to env_soundscape_triggerable.

1) Browse to: C:\Users\Shawn\AppData\Local\Autodesk\3dsMax\2015 - 64bit\ENU\scripts\WallWorm.com\entities (except use the path where YOUR WW settings would be, dependent on your Windows User Name and Version of 3ds Max).
2) Look for the file that represents your game's entities. For CS:GO, this will be csgo_entities.ms
3) Open the file above in Notepad++ or equivalent
4) Search for the block of code starting with: global wallworm_env_soundscape_triggerable_CA
5) Delete that entire block of code. Note that the block ends with the next entity entry which will likely be global wallworm_env_spark_CA (so do not delete the entry for env_spark)
6) Where the deleted code was, paste this code (in its entirety), save the file, and restart 3ds Max:

global wallworm_env_soundscape_triggerable_CA = attributes "WW Entity env_soundscape_triggerable" version: 58
(
local wallworm = true
local entityType = "PointClass"
local thisNode = undefined
local entname = "env_soundscape_triggerable"
local isWWPRO = true
local hasOutputs = true
local availableOutputs = #("OnUser1", "OnUser2", "OnUser3", "OnUser4", "OnPlay")
local hasInputs = true
local currentInputs = #()
local availableInputs = #("Kill", "KillHierarchy", "AddOutput", "FireUser1", "FireUser2", "FireUser3", "FireUser4", "SetParent", "SetParentAttachment", "SetParentAttachmentMaintainOffset", "ClearParent", "Enable", "Disable", "Enable", "Disabled", "ToggleEnabled")
function getNode =
(
if NOT isValidNode thisNode then
(
thisNode = refs.dependentnodes (custAttributes.getOwner this) firstonly:on
)
thisNode
)
local iconsprite = "editor/env_soundscape_triggerable.vmt"
function hasOutputFor obj =
(
wallworm_entityFunctions_hasOutputFor this obj
)
function getMyInputs =
(
disableRefMsgs()
if hasInputs == true then
(
currentInputs = for obj in objects WHERE isProperty obj #hasOutputs AND isProperty obj #outputs AND obj.outputs.count > 0 AND isProperty obj #wallworm AND (hasOutputFor obj) == true collect obj
)
enableRefMsgs()
currentInputs
)
function target_name_filter obj =
(
if (isProperty obj #targetname AND obj.targetname != undefined AND obj.targetname != "" AND isProperty obj #wallworm) then
(
true
)
else
(
false
)
)
function deleteProxyCA =
(
wallworm_entityFunction_deleteProxyCA this
)
function updateMeshFromObj newProp deleteAfter:true doRotate:false =
(
wallworm_entityFunctions_updateMeshFromObj this newProp deleteAfter:deleteAfter doRotate:doRotate
)
function loadMeshFromLibrary doRotate:false =
(
wallworm_entityFunctions_loadMeshFromLibrary this params doRotate:doRotate
)
local propValStartDisabled = 0
local propMapStartDisabled = #("0", "1")
local propValsoundscape = "Nothing"
local propMapsoundscape = #("Nothing", "Automatic", "Automatic_Dialog", "GenericIndoor", "GenericOutdoor")
local exportProps = #("targetname", "parentname", "StartDisabled", "radius", "soundscape", "position0", "position1", "position2", "position3", "position4", "position5", "position6", "position7")
parameters main rollout:params
(
outputs type:#stringTab tabSizeVariable:true
targetname type:#string ui:wwmt_targetname_ui
parentname type:#string ui:wwmt_parentname_ui
StartDisabled type:#string ui:wwmt_StartDisabled_ui default:"0"
radius type:#integer ui:wwmt_radius_ui default:128
soundscape type:#string ui:wwmt_soundscape_ui default:"Nothing"
position0 type:#string ui:wwmt_position0_ui default:""
position1 type:#string ui:wwmt_position1_ui default:""
position2 type:#string ui:wwmt_position2_ui default:""
position3 type:#string ui:wwmt_position3_ui default:""
position4 type:#string ui:wwmt_position4_ui default:""
position5 type:#string ui:wwmt_position5_ui default:""
position6 type:#string ui:wwmt_position6_ui default:""
position7 type:#string ui:wwmt_position7_ui default:""
)
rollout params "Entity Properties"
(
Label entityLabel "env_soundscape_triggerable"
Label wwmt_targetname_ui_label "Name" tooltip:"Name: The name that other entities refer to this entity by."
EditText wwmt_targetname_ui "" type:#string tooltip:"Name: The name that other entities refer to this entity by."
Label wwmt_parentname_ui_label "Parent" tooltip:"Parent: The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent."
EditText wwmt_parentname_ui "" type:#string tooltip:"Parent: The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent."
PickButton wwmt_parentname_pickme_ui "Pick Parent" message:"Pick Target Entity for Parent" filter:target_name_filter
on wwmt_parentname_pickme_ui picked obj do
(
parentname = obj.targetname
)
DropDownList wwmt_StartDisabled_ui "Start Disabled" type:#string items:#("No", "Yes")
on wwmt_StartDisabled_ui selected i do
(
StartDisabled = propMapStartDisabled[i]
)
Spinner wwmt_radius_ui "Radius" type:#integer range:[-10000, 10000, 128] tooltip:"Radius: If set to -1, then the player can hear the soundscape as long as he can see it (regardless of distance to it)."
ComboBox wwmt_soundscape_ui "Soundscape" type:#string items:#("Nothing", "Automatic", "Automatic (dialog)", "Indoor", "Outdoor") tooltip:"Soundscape: The name of the soundscape to use. Corresponds to an entry in the soundscapes*.txt file in the hl2\scripts directory." height:3
on wwmt_soundscape_ui selected i do
(
soundscape = propMapsoundscape[i]
)
on wwmt_soundscape_ui entered tex do
(
soundscape = tex
if propMapsoundscape != undefined AND findItem propMapsoundscape tex == 0 then
(
append propMapsoundscape tex
sort propMapsoundscape
wwmt_soundscape_ui.items = propMapsoundscape
wwmt_soundscape_ui.selection = findItem wwmt_soundscape_ui.items tex
soundscape = wwmt_soundscape_ui.selection
)
)
EditText wwmt_addItems_soundscape_ui "Add" toolTip:"Enter text here to add a new item to Soundscape"
on wwmt_addItems_soundscape_ui entered tex do
(
newV = trimLeft (trimRight tex)
if propMapsoundscape != undefined AND findItem propMapsoundscape newV == 0 then
(
append propMapsoundscape newV
sort propMapsoundscape
wwmt_soundscape_ui.items = propMapsoundscape
wwmt_soundscape_ui.selection = findItem wwmt_soundscape_ui.items newV
if newV != undefined then
(
soundscape = newV
)
)
)
Label wwmt_position0_ui_label "Sound Position 0" tooltip:"Sound Position 0: A sound position that will be referenced inside the soundscape text file. Usually used to position a set of sounds within the world."
EditText wwmt_position0_ui "" type:#string tooltip:"Sound Position 0: A sound position that will be referenced inside the soundscape text file. Usually used to position a set of sounds within the world."
PickButton wwmt_position0_pickme_ui "Pick Sound Position 0" message:"Pick Target Entity for Sound Position 0" filter:target_name_filter
on wwmt_position0_pickme_ui picked obj do
(
position0 = obj.targetname
)
Label wwmt_position1_ui_label "Sound Position 1" tooltip:"Sound Position 1: A sound position that will be referenced inside the soundscape text file. Usually used to position a set of sounds within the world."
EditText wwmt_position1_ui "" type:#string tooltip:"Sound Position 1: A sound position that will be referenced inside the soundscape text file. Usually used to position a set of sounds within the world."
PickButton wwmt_position1_pickme_ui "Pick Sound Position 1" message:"Pick Target Entity for Sound Position 1" filter:target_name_filter
on wwmt_position1_pickme_ui picked obj do
(
position1 = obj.targetname
)
Label wwmt_position2_ui_label "Sound Position 2" tooltip:"Sound Position 2: A sound position that will be referenced inside the soundscape text file. Usually used to position a set of sounds within the world."
EditText wwmt_position2_ui "" type:#string tooltip:"Sound Position 2: A sound position that will be referenced inside the soundscape text file. Usually used to position a set of sounds within the world."
PickButton wwmt_position2_pickme_ui "Pick Sound Position 2" message:"Pick Target Entity for Sound Position 2" filter:target_name_filter
on wwmt_position2_pickme_ui picked obj do
(
position2 = obj.targetname
)
Label wwmt_position3_ui_label "Sound Position 3" tooltip:"Sound Position 3: A sound position that will be referenced inside the soundscape text file. Usually used to position a set of sounds within the world."
EditText wwmt_position3_ui "" type:#string tooltip:"Sound Position 3: A sound position that will be referenced inside the soundscape text file. Usually used to position a set of sounds within the world."
PickButton wwmt_position3_pickme_ui "Pick Sound Position 3" message:"Pick Target Entity for Sound Position 3" filter:target_name_filter
on wwmt_position3_pickme_ui picked obj do
(
position3 = obj.targetname
)
Label wwmt_position4_ui_label "Sound Position 4" tooltip:"Sound Position 4: A sound position that will be referenced inside the soundscape text file. Usually used to position a set of sounds within the world."
EditText wwmt_position4_ui "" type:#string tooltip:"Sound Position 4: A sound position that will be referenced inside the soundscape text file. Usually used to position a set of sounds within the world."
PickButton wwmt_position4_pickme_ui "Pick Sound Position 4" message:"Pick Target Entity for Sound Position 4" filter:target_name_filter
on wwmt_position4_pickme_ui picked obj do
(
position4 = obj.targetname
)
Label wwmt_position5_ui_label "Sound Position 5" tooltip:"Sound Position 5: A sound position that will be referenced inside the soundscape text file. Usually used to position a set of sounds within the world."
EditText wwmt_position5_ui "" type:#string tooltip:"Sound Position 5: A sound position that will be referenced inside the soundscape text file. Usually used to position a set of sounds within the world."
PickButton wwmt_position5_pickme_ui "Pick Sound Position 5" message:"Pick Target Entity for Sound Position 5" filter:target_name_filter
on wwmt_position5_pickme_ui picked obj do
(
position5 = obj.targetname
)
Label wwmt_position6_ui_label "Sound Position 6" tooltip:"Sound Position 6: A sound position that will be referenced inside the soundscape text file. Usually used to position a set of sounds within the world."
EditText wwmt_position6_ui "" type:#string tooltip:"Sound Position 6: A sound position that will be referenced inside the soundscape text file. Usually used to position a set of sounds within the world."
PickButton wwmt_position6_pickme_ui "Pick Sound Position 6" message:"Pick Target Entity for Sound Position 6" filter:target_name_filter
on wwmt_position6_pickme_ui picked obj do
(
position6 = obj.targetname
)
Label wwmt_position7_ui_label "Sound Position 7" tooltip:"Sound Position 7: A sound position that will be referenced inside the soundscape text file. Usually used to position a set of sounds within the world."
EditText wwmt_position7_ui "" type:#string tooltip:"Sound Position 7: A sound position that will be referenced inside the soundscape text file. Usually used to position a set of sounds within the world."
PickButton wwmt_position7_pickme_ui "Pick Sound Position 7" message:"Pick Target Entity for Sound Position 7" filter:target_name_filter
on wwmt_position7_pickme_ui picked obj do
(
position7 = obj.targetname
)
function input_filter_func obj =
(
isProperty obj #availableInputs
)
Group "Outputs"
(
Button addOutput "Add New Output" tooltip:"Add a new blank Output into the Output list below. After creation, set the parameters below."
ComboBox outputs_ui "Current List"
Button deleteOutput "Remove Selected Output" tooltip:"Delete the currently selected output in the list above."
DropDownList outputName "Output" items:availableOutputs
EditText outputTargetName "Target" tooltip:"Enter the targetname OR target classname for this output."
PickButton getInputs "Pick Target" filter:input_filter_func tooltip:"Pick an entity in the scene. Only those with Inputs will work."
ComboBox outputInput "Via This Input"
EditText outputParamOverride "Value"
Spinner outputDelay "Delay" range:[0, 16000, 0]
Spinner outputFireLimit "Times to Fire" type:#integer range:[-1, 16000, -1]
)
function getCurrentInputs tex =
(
::wallworm_entityFunctions_getCurrentInputs this tex
)
function updateInputListFromObjs objs =
(
::wallworm_entityFunctions_updateInputListFromObjs this params objs
)
function setOutputsUIfromOutput str =
(
::wallworm_entityFunctions_setOutputsUIfromOutput this params str
)
function setOutputsFromOutputUI =
(
::wallworm_entityFunctions_setOutputsFromOutputUI this params
)
on outputDelay changed val do
(
setOutputsFromOutputUI()
)
on outputFireLimit changed val do
(
setOutputsFromOutputUI()
)
on outputName selected sel do
(
setOutputsFromOutputUI()
)
on outputInput selected sel do
(
setOutputsFromOutputUI()
)
on outputParamOverride changed tex do
(
setOutputsFromOutputUI()
)
on outputInput entered tex do
(
::wallworm_entityFunctions_on_outputInput_entered this params tex
)
on outputTargetName changed tex do
(
::wallworm_entityFunctions_on_outputTargetName_changed this params tex
)
on addOutput pressed do
(
::wallworm_entityFunctions_on_addOutput_pressed this params
)
on getInputs picked obj do
(
::wallworm_entityFunctions_on_getInputs_picked this params obj
)
on deleteOutput pressed do
(
::wallworm_entityFunctions_on_deleteOutput_pressed this params
)
on outputs_ui selected sel do
(
::wallworm_entityFunctions_on_outputs_ui_selected this params sel
)
on outputs_ui rightClick do
(
::wallworm_entityFunctions_on_outputs_ui_rightClick this params
)
on outputs_ui entered tex do
(
::wallworm_entityFunctions_on_outputs_ui_entered this params tex
)
Group "Inputs"
(
Button addInput "Refresh Inputs"
ComboBox inputslist "Current Input Entities"
Button gotoInput "Go To Input"
)
on gotoInput pressed do
(
if inputslist.selection != 0 AND currentInputs[inputslist.selection] != undefined then
(
select currentInputs[inputslist.selection]
)
)
on inputslist selected sel do
(
if sel != 0 AND currentInputs[sel] != undefined then
(
flashNodes #(currentInputs[sel])
forceCompleteredraw()
)
)
on addInput pressed do
(
getMyInputs()
inputslist.items = for obj in currentInputs collect obj.name
)
Hyperlink wwbutton "Powered by Wall Worm" address:"http://dev.wallworm.com/core/pages/list/doc.php?docSearch[search]=env_soundscape_triggerable&f7_submit=Search" color:(Color 0 0 255) hovercolor:(Color 255 0 0) visitedcolor:(Color 0 0 255)
Hyperlink valvewikie "Wiki: env_soundscape_triggerable" address:"https://developer.valvesoftware.com/wiki/env_soundscape_triggerable?from=3ds+max+and+wallworm" color:(Color 0 0 255) hovercolor:(Color 255 0 0) visitedcolor:(Color 0 0 255)
on params open do
(
if ::wallworm_entityFunctions_on_outputs_ui_selected == undefined then ( try(filein (wallworm_installation_path+"/WallWorm.com/common/fgd_funcs.ms"))catch())
if StartDisabled != undefined then
(
if findItem propMapStartDisabled StartDisabled == 0 then
(
append propMapStartDisabled StartDisabled
local tmp = wwmt_StartDisabled_ui.items
append tmp StartDisabled
wwmt_StartDisabled_ui.items = tmp
wwmt_StartDisabled_ui.selection = propMapStartDisabled.count
)
else
(
wwmt_StartDisabled_ui.selection = (findItem propMapStartDisabled StartDisabled)
)
)
if propMapsoundscape != undefined AND soundscape != undefined AND  findItem (wwmt_soundscape_ui.items) soundscape == 0 then
(
appendIfUnique propMapsoundscape soundscape
sort propMapsoundscape
propMapsoundscape = makeUniqueArray propMapsoundscape
wwmt_soundscape_ui.items = propMapsoundscape
)
wwmt_soundscape_ui.selection = (findItem propMapsoundscape soundscape)
outputs_ui.items = (getProperty this #outputs) as Array
outputs_ui.selection = 0
)
)
on clone orig do thisNode = undefined
on update do
(
if isValidNode (getNode()) then
(
if ::WallWormEntityOps == undefined then ( try(macros.run "wallworm.com" "WallWormInitialize")catch())
if ::WallWormEntityOps != undefined then ( ::WallWormEntityOps.wallworm_entity_ca_postupdate thisNode oldversion:version)
)
)
)


Again, if you delete extra lines or only paste part of the code above, your entity tools in Wall Worm will break and you will likely see other errors when loading WW functions.

SMF spam blocked by CleanTalk