[QUOTE=Z0mb1n3;50607884]Well playing around with it, it seems you should be using
[lua]local sched = ai_schedule.New( string scheduleName );sched:AddTask( string taskName, int taskEnum );[/lua]
Works fine for me like that
EDIT:
actually no i'm horribly wrong[/QUOTE]
It won't work, you have to remake the whole schedules and task modules and also the schedules.lua in the AI Base.
Quick question, why is there no support for Unsigned Integers in DataTables? [URL="https://wiki.garrysmod.com/page/Entity/NetworkVar"]We have the Int var type, but not UInt[/URL]. Unless the Wiki just doesn't list it of course.
[QUOTE=Noi;50607850]You do realize that I did not make Lua api and don't have source engine sources?[/QUOTE]
You figured out that the second argument is a table, why not put that in there?
As for the rest, there's a big difference between "this is awful, pls expand this article" and "this function is badly documented, how does it work?"
The first is a rude and entitled demand, the second is a friendly question.
[QUOTE=WinterPhoenix;50608563]Quick question, why is there no support for Unsigned Integers in DataTables? [URL="https://wiki.garrysmod.com/page/Entity/NetworkVar"]We have the Int var type, but not UInt[/URL]. Unless the Wiki just doesn't list it of course.[/QUOTE]
Technically its the same only the representation is not.
[QUOTE=Noi;50609629]And what, devs will refuse to document a function on public wiki just because they're not as entitled as Queen Elizabeth? My condolences.[/QUOTE]
No, it's just cause they just don't have time. There's tons of undocumented functions on the wiki, too many for a couple of devs to document all by themselves when they have better stuff to do.
Probably not the place to ask, but because it could be a bug or something:
Why is there such a performance hit using/creating 2d3d rendering contexts? I can't seem to do much rendering at all in them without losing a lot of FPS (300 -> 260 with one entity).
[QUOTE=>>oubliette<<;50609950]Probably not the place to ask, but because it could be a bug or something:
Why is there such a performance hit using/creating 2d3d rendering contexts? I can't seem to do much rendering at all in them without losing a lot of FPS (300 -> 260 with one entity).[/QUOTE]
I wouldn't consider 0.5 milliseconds to be a ~huge~ performance hit. What's it like with queued rendering enabled?
[QUOTE=Willox;50610160]I wouldn't consider 0.5 milliseconds to be a ~huge~ performance hit. What's it like with queued rendering enabled?[/QUOTE]
It stacks up, so with 5 entities (5 rendering contexts) it goes to < 100 FPS when it'd normally be 300 (presumably that would be very poor performance for a PC that rarely gets 60 in the first place). The rendering is basically a panel that's PaintManual'd in a 3d2d rendering context, rendering the panel on the screen doesn't effect the performance noticeably at all.
[url=http://i.imgur.com/f4MNucW.jpg]~300 FPS with nothing there[/url] (no difference with queued rendering / multicore enabled)
[url=http://i.imgur.com/kaKLZA2.jpg]~80 FPS with 5 ents[/url] (mcore/queued disabled)
[url=http://i.imgur.com/trwn5ZU.jpg]~160 FPS with 5 ents[/url] (mcore/queued enabled)
Also I get weird flickering on some stuff when rendering these which I just noticed (fullscreen & turn up quality to see it). Only happens with multicore enabled.
[video]https://youtu.be/2kXOGlvrDtY[/video]
[QUOTE=Robotboy655;50610720][url]http://steamcommunity.com/games/garrysmod/announcements/detail/877456033724316107[/url][/QUOTE]
Wait why is rest of the stuff no being pushed with the update though? Like all these gucci changes: [url]http://wiki.garrysmod.com/changelist/[/url]
Are they not tested enough yet? I have been playing on the dev for months, haven't seen anything bad. I actually saw some performance boost
[QUOTE=Robotboy655;50610720][url]http://steamcommunity.com/games/garrysmod/announcements/detail/877456033724316107[/url][/QUOTE]
Before you push the update, can you make multicore convars save? They should save.
[QUOTE=FPtje;50610832]Before you push the update, can you make multicore convars save? They should save.[/QUOTE]
or even better enable it by default so I don't have to explain to hundreds of players how to.
[QUOTE=StonedPenguin;50611057]or even better enable it by default so I don't have to explain to hundreds of players how to.[/QUOTE]
Don't bother, when they're deemed stable and safe they will probably be made on by default. Leave the unaware players be.
[QUOTE=Zeh Matt;50609617]Technically its the same only the representation is not.[/QUOTE]
Well, no, Signed supports Positive or Negative numbers up to 2^31 - 1. Unsigned supports only Positive numbers up to 2^32 - 1.
That's a difference of about 2.14 Billion that you can't use, if you're just trying to represent an only-positive number.
[QUOTE=WinterPhoenix;50612807]Well, no, Signed supports Positive or Negative numbers up to 2^31 - 1. Unsigned supports only Positive numbers up to 2^32 - 1.
That's a difference of about 2.14 Billion that you can't use, if you're just trying to represent an only-positive number.[/QUOTE]
Well, yes. It holds the same exact capacity, signed or unsigned. The number is whatever you interpret it as. Surely it wouldn't take someone but 10 seconds to figure out how to work with that.
[QUOTE=Revenge282;50612836]Well, yes. It holds the same exact capacity, signed or unsigned. The number is whatever you interpret it as. Surely it wouldn't take someone but 10 seconds to figure out how to work with that.[/QUOTE]
You're not quite following what I'm saying. Say you have an integer, 3 Billion, that you want to network using DTVars. If you do [B]ENTITY:SetDTInt(0, 3000000000)[/B] (I'm using SetDT* here for sake of simplicity, as it's the equivalent of what I'm doing in my code properly), it'll wrap around and make the value shown by [B]ENTITY:GetDTInt(0)[/B] be -2147483648, obviously, because DTInt uses a Signed Integer.
Now I [I]could[/I] hack my way around that issue, which I think is what you're saying, and get the value, strip the negative, add it to 2^31 - 1, and use a new variable to represent what the [I]actual[/I] value is. But what if I don't want to do that in the several blocks of code that will be using that value? What if I just want to do [B]ENTITY:GetDTUInt(0)[/B] and call it a day?
[QUOTE=WinterPhoenix;50612944]:snip:[/QUOTE]
If it's really that big of an issue, just extend the Entity metatable yourself?
[QUOTE=Joeyl10;50612988]If it's really that big of an issue, just extend the Entity metatable yourself?[/QUOTE]
Because, frankly, it should be natively supported period. We have net.WriteUInt, why not ENTITY:SetDTUInt?
[QUOTE=WinterPhoenix;50612999]Because, frankly, it should be natively supported period. We have net.WriteUInt, why not ENTITY:SetDTUInt?[/QUOTE]
Because Source's entity networking isn't terribly smart and adding more DT vars has messed up the networking in the past.
[editline]28th June 2016[/editline]
Adding another 64 (or 32, I can't remember which now) netvars is yet more overhead to a networking system that has already pretty much at its limit, especially when said netvar type can be replicated with an existing type already.
[QUOTE=Joeyl10;50613110]Because Source's entity networking isn't terribly smart and adding more DT vars has messed up the networking in the past.
[editline]28th June 2016[/editline]
Adding another 64 (or 32, I can't remember which now) netvars is yet more overhead to a networking system that has already pretty much at its limit, especially when said netvar type can be replicated with an existing type already.[/QUOTE]
Why would they implement more netvars for this? Just create other bindings with casts
[QUOTE=>>oubliette<<;50613150]Why would they implement more netvars for this? Just create other bindings with casts[/QUOTE]
Because if we've learned anything from the NWVars2 rollout, it's that type juggling is bad.
do you guys plan on updating the voice codecs?
[QUOTE=>>oubliette<<;50613150]Why would they implement more netvars for this? Just create other bindings with casts[/QUOTE]
For programming convenience. I wouldn't mind a set of uint dtvar functions that works by casting in the backend. Winterphoenix can probably even PR it.
The downside would be that Int and UInt would have to share the allocations, which isn't too bad but can be easy to forget and can become a debugging nightmare if you do forget.
There's already too many default DT variables
I honestly wouldn't want to touch the hardcoded dt variables anymore, we have _Kilburn's nw2 system, we can simply use that.
[editline]29th June 2016[/editline]
In fact, isn't the system stable enough to replace the DT accessors in Lua without breaking anything?
Are NW2 vars saved in singleplayer when the game is saved? That's my first thought for a potential deal breaker
[QUOTE=NeatNit;50615141]Are NW2 vars saved in singleplayer when the game is saved? That's my first thought for a potential deal breaker[/QUOTE]
Which one? The legacy save system or the dupe system? In the latter case there's accessors that save dt vars individually ( all fields except entities ).
If we were to replace dt vars with nwvars2 within the Lua functions nothing would essentially change.
It won't replace DTVars but NWVars, which would make NWVars equal or better than DT vars.
Testing prerelease...
HTTP() doesn't work inside of HUDPaint anymore. Have to use a timer.Simple(0. That's all I've found so far.
Sorry, you need to Log In to post a reply to this thread.