Talk:Lua Mod API

From WolfWiki
Revision as of 01:19, 25 February 2007 by ReyalP (Talk | contribs) (et_ClientSay ?)

Jump to: navigation, search

please call et_Obituary() and et_Print() at the end of the engine function because we can do better output then. example: the engine output (ETPlayer killed himself.) is after the lua output (Hahaha! ETPlayer seems to be a selfkill noob!). thx!! --pdi 09:13, 26 December 2006 (PST)

It is called at the beginning of the function so lua mods can override obituary and print entirely if they want. I can make a separate lua hook which is called at the end of the function, eg et_ObituaryPost and et_PrintPost. Bani 11:52, 3 January 2007 (PST)
Ok, this sounds good to me! Big THX!! :) Please have also a look at field section of this page! ;) --pdi 05:41, 4 January 2007 (PST)

Can we have a intercepted version of et_ClientUserinfoChanged() to return 1 to intercept it with a mod and return 0 to pass it through to the server? THX!! --pdi 00:54, 7 February 2007 (PST)

I don't understand what you want here. You should already be able to call trap_SetUserinfo from et_ClientUserinfoChanged if you want to modify the values. --ReyalP 19:00, 8 February 2007 (PST)
I found another way to do that. Sorry, but didn't need that anymore. --pdi 12:16, 9 February 2007 (PST)

IPC stuff


i would like a et_IPCReceive whit an return value so u can send info back on a request

i would like a et_IPCSend that can send to all lua mods then them mods can decide if the wana use that message or not =FF=Im2good4u 12:35, 8 January 2006 (PST)


 et_IPCReceive wouldn't send it to the other mod... afaik... so just use another send
 just et_IPCSend to all modules (afaik, you can even send to ones not there), simple loop function

gotenks 20:04, 8 January 2006 (CST)

yeh probely but its not verry handy its better to get the good vmnumber or to e able to send on mod filenames

apart from that returning a value will be more handy since tnhe u cna contine in 1 funtion else u got to reacise it in the recieve funtion =FF=Im2good4u 10:45, 9 January 2006 (PST)

Fields for the next release

I think Kotoko wants the ps.velocity field here. It would be a good idea, I think. --FARMICEUDICAL 20:23, 5 December 2006 (PST)

bani: RW access to all "sess.*" fields (sess.skillpoints, sess.startskillpoints, sess.startxptotal, ...) would be great. thanx! --pdi 05:55, 2 August 2006 (PDT)

bani: please make all "pers.*" fields (pers.clientTimeNudge, pers.clientMaxPackets, ...) available. thanx! --pdi 01:04, 17 August 2006 (PDT)

you can get timenudge and maxpackets from the userinfo --ReyalP 20:19, 18 August 2006 (PDT)
i know, but i ask for all pers.* fields. pers.clientTimeNudge and pers.clientMaxPackets are only examples. :) --pdi 01:56, 21 August 2006 (PDT)

bani: will we have rw access to those fields (all sess.* and all pers.*) with next update? please!! --pdi 07:02, 19 October 2006 (PDT)

we are not going to add all the fields. A lot of them don't make sense for lua mods. Explain which ones you need --ReyalP 20:57, 5 February 2007 (PST)
Ok, didn't know why i'm asking for (long time ago) but fields for xp/skill (sess.skillpoints array - if i remember) control would be great. THX!! --pdi 00:54, 7 February 2007 (PST)

ps.weapon, so arbitrary weapons can be added to or removed from arbitrary classes. For example, trickjump servers don't like Field Ops spamming airstrikes or artillery, but they do appreciate the ammo they give out. --FARMICEUDICAL 21:09, 5 December 2006 (PST)

ps.weapon won't do that for you. ps.weapons might :) --ReyalP 17:14, 6 December 2006 (PST)

Okay then, ps.weapon so that medics can be set to spawn with the adrenaline needle out instead of the smg. --FARMICEUDICAL 03:23, 11 December 2006 (PST)

Please give read access to g_campaignInfo_t in a field like campaignInfo. Thx!! --pdi 08:57, 7 January 2007 (PST)

LoadLib

Add loadlib ppl it says u have lua basic included but not loadlib !!

(on windows it gives an error attept to call global load lin a nil valua)=FF=Im2good4u 05:16, 15 February 2006 (PST)

XP control not just skill

I would like to request RW access to the "sess.skillpoints" array

At least a callback on et.G_AddSkillPoints ( cno, skill, points ) =FF=Im2good4u 07:45, 8 March 2006 (PST)

Locations

[22:08:57] <Vetinari> [NW]reyalP: if you're exposing map coords, it would 
  be nice to have something like et.PostitionName( et.gentity_get(id, "r.currentOrigin")) 
  <-- location name or map coords "(B, 3)", so I don't have to parse the _loc.dat ;->

et_ClientSay ?

err.. what's this:

-- et_ClientSay had to be removed in order to intercept all commands 
-- so here's a wrapper for that
   arg0 = et.trap_Argv(0) -- get the main command
   if arg0 == "say" then
       return et_ClientSay( clientNum, et.SAY_ALL, et.ConcatArgs(1))

This should be

       return et.G_Say( clientNum, et.SAY_ALL, et.ConcatArgs(1))

?

No, et_ClientSay is a function you would define yourself to filter or do something with chats. It was it's own callback in earlier version of the API. -ReyalP 17:19, 24 February 2007 (PST)