Project Zomboid

Project Zomboid

782 个评价
SearchModeAPI
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
15.254 KB
2022 年 8 月 20 日 下午 2:10
2024 年 12 月 26 日 下午 6:39
3 项改动说明 ( 查看 )

订阅以下载
SearchModeAPI

描述
Framework for "search fog" mods compatibility, e.g. Read While Walking

How to use (for modders):
SearchModeAPI.Register("my_mod_name", 0.5) -- only once! the second parameter is your priority ............. -- low priority mods will be igonred SearchModeAPI.Lock("my_mod_name") -- you're the ruler, locks the fog for you .......... SearchModeAPI.Unlock("my_mod_name") -- you don't need fog anymore ................ -- your code must be marked: SearchModeAPI.Activate("my_mod_name") -- all stuff now is related to your mod local mode = getSearchMode():getSearchModeForPlayer(0) getSearchMode():setEnabled(0,true) mode:getBlur():setTargets(0.5, 0.5) mode:getDesat():setTargets(0.5, 0.5) mode:getRadius():setTargets(3, 3) mode:getDarkness():setTargets(0.1, 0.1) SearchModeAPI.Deactivate("my_mod_name") -- end of code from your mod

The priority is the number. You need high values if your mechanics is very specific, e.g. you enables it only on certain actions. And you need low values if your mechanics is common, e.g. you use the fog all the time. This concept allows to lock searchmode manager for some/all mods.

Some values of priority:
-100: default value for all unknown mods, also is applyed to vanilla search mode.
10: Read While Walking mod.

P.S. It was quite hard to make this mod.

Workshop ID: 2851764922
Mod ID: SearchModeAPI41
热门讨论 查看全部(2)
1
2024 年 12 月 26 日 下午 8:01
Use This for Blindbolds, Masks, etc.
Jane Helldiver
0
2022 年 8 月 20 日 下午 2:34
How it works
star
21 条留言
chris.s.clevenger 2024 年 12 月 26 日 下午 3:51 
42?
star  [作者] 2024 年 3 月 30 日 上午 3:56 
@Morgan, sure.
@Retrad_, you can make such a mod.
Morgan 2024 年 3 月 28 日 下午 5:57 
May I add this to my modpack?
Retrad_ 2024 年 2 月 7 日 下午 5:05 
i did not expect a user manual for it, wow!

say, how would you go about making a script that detects clothing and triggers the fog? say... sunglasses, yes, sunglasses
Camoblast 2023 年 10 月 6 日 上午 12:58 
it wasnt your mod that i was concerned about but i noticed my problem after moving the reading mod in the list is why i used your mod.but yea ill give it a whirl
Camoblast 2023 年 10 月 6 日 上午 12:57 
Ok cool.ill give that a whirl..i have not had these many problems using most mods really until i cam bak to PZ for a spin and had found MY SON lol who loves PZ had subbed to the Manager Mod because he hated the cursor lag with so many mods in the list normally,without Manager,,IMa fuck it off.and see what happens and put your mod above what ever mod request that when i sub to em..Is the reading mod the only mod this serves..I found it because walk while readin was buggin out...was working then not working..put your mod in and it works..
star  [作者] 2023 年 10 月 4 日 下午 9:49 
I don't use Load Manager, so I'm not sure. But I think it's better to load this mod first. This mod is just a framework and doesn't conflict. Conflicts between other mods may arise in theory if some mods use this API and others don't. Anyway, it's very specific, and you can treat these notices as warnings.
Camoblast 2023 年 10 月 4 日 下午 8:55 
With just Load Manger and Load enhancer enabled and nothing else,when you go into the manage order you will notice Text on top of the Order window,,IT tells you 2 different things,i will try explain....
ok so just enable those 2 mods i said.go into your load order and read the Text above...IT will usually say (You Normally have to change load order to avoid conflicts and errors...NOW..when i attempt to put in any mod after those 2,and that mod would be Mod Options the Text above will change after i refresh and say (You DO have to change this to resolve certain conflicts and errors,as precedence is important in many cases yada yada yada).. I understand what it means but is it telling me this as a reminder or is this part of the functions for the load manger/Enhancer? I mean is it designed to switch between text when mods conflict?
star  [作者] 2023 年 10 月 1 日 下午 10:37 
@Camoblast, who tells you? "it"?
Camoblast 2023 年 10 月 1 日 上午 10:49 
So where do you put this in load order? Im using :
Mod Options
Mod manager
Mod Server
when i add SearchModeAPI it tells me i DO have to change order to avoid certain conflicts and errors.cant add anything past Mod :oad Enhancer without getting that message above the Load Panel...even if i leave SearchModeAPI out...any ideas..ive rusubbed to all my subs and even reinstalled PZ but still says same thing...