jeshyr Lv 1
The new exploration puzzle 488 has the clash importance "fiddled" so that if you lower it below approximately 0.25 everything implodes the way it normally does way around 0.0 - this means you can't currently run almost any script at all.
Here's a reasonably easy way to edit almost any script to work - it probably won't be ideal, but you can at least use it while you fiddle around with fixing other things. It should be fine even if you are not a coder
- You'll find a line in MOST scripts which looks like this:
CI=set_behavior_clash_importance
If you find that line then delete it - if you can't find in then skip to ADVANCED down this post further…
Most scripts written by people who write lots of scripts (e.g. rav3n, taloc, etc.) do use this line but other script writers may not.
- In the exact place that line used to be, add this bit of code by copying/pasting:
function Relative_Clash_Importance(x)
-- Treat argument as fraction between min-max
-- Argument must be between 0-1
max_CI=1.0
min_CI=0.25
range=max_CI - min_CI
new_CI = (range * x) + min_CI
set_behavior_clash_importance(new_CI)
print("CI requested is ",x,", actual CI used: ",new_CI)
end
CI=Relative_Clash_Importance</code>
You can fiddle with the min_CI and max_CI settings which are the minimum and maximum clash importance settings you want to allow - just change the numbers from 1.0 and 0.25 to whatever you want. They need to be between 0 and 1 and max_CI needs to be bigger than min_CI but that's about the only limits you have.
This will basically RESCALE your script's clash importance to fit between your min_CI and max_CI values, so you shouldn't have to edit anything outside this snippet at all as long as your script uses the CI=set_behavior_clash_importance line in it already.
This is all - try pressing "run" and it should work fine!
ADVANCED:
If the script you want to mess with does NOT use that "CI=set_behavior_clash_importance" line in it already you can still edit it by following these instructions:
- At EVERY place in the script which has a line that looks like this:
set_behavior_clash_importance(0.5)
(with any number between 0 and 1, not just 0.5) you can change it so it says this:
CI(0.5)
Change the number so it matches whatever it was before you changed it - just change the bit that says "set_behaviour_clash_impoortance" to say "CI" and you should be right. You have to change every instance in the whole script EXCEPT the one in the snippet you added .
- At the very top of the script (above what is currently line 1) add the same script listed in step 2 above.
Now press "run" and watch it work!
If all the recipe output is making you a bit crazy trying to watch the script's regular output, just delete the whole line that starts with "print" and that will shut it up.
If you have tried and failed with any specific script then write down EXACTLY what the error code was and what happened when you pressed "run" (a screen shot helps) and post here and I'll try to help you. But you must try first!