about scripts using

Added by erdongchen almost 7 years ago

AIS got its compiler,but where are its own language scripts (not sure which files are )?

Here is just a thought of mine:
However,in code\ryzom\common\data_common\r2 there are some lua scripts shared by both client and server(I think they are common data),which .For example, code\ryzom\common\data_common\r2\ R2_palette.lua defines some npc data.So my first clue is that lua scripts in the common folder define actions and activities properties (maybe not correct,or it is not using now),and ui for actions as well.

simulation_service\simulates_dmc.h has interface to run lua scripts -- class CDynamicMapClient 's function "runLuaScript" in \simulation_service\simulation_dmc.h .Maybe not in use,if lua is not for services now.

If lua scripts are only used for client ,I 'd like to know about how AIS use its own language scripts and where are they.As far as I go,I saw AIS compiler read external files (maybe scripts ) into its buffer,but I have not figured out where they go .I have not saw from the code yet,and will continue to see .


Replies (9)

RE: about scripts using - Added by erdongchen almost 7 years ago

There are class CComLuaModule for lua interface in both code\ryzom\server\src\simulation_service\com_lua_module.h and
code\ryzom\client\src\r2\dmc\com_lua_module.h ,which will load interfaces from lua lib to run lua and somethings like that .

RE: about scripts using - Added by kaetemi almost 7 years ago

The ai scripts are inside .primitive files of your continent. Edited using World Editor.

RE: about scripts using - Added by erdongchen almost 7 years ago

ok.Oh,I maybe begin to understand somethings . World Editor works for mission edition and somethings like that.I heard that scenarios editor has not been published .Some AI functionality edition of ryzom may have has to wait for tools like that.

Just clear my thought and list my point of view :(please correct me if I am wrong)
script_parser.lex is for ryzom game AIS language syntax;
script_parser.yacc is for ryzom game AIS action tree managerment;
script_vm.cpp and script_vm.h are for virtual machine to run ryzom ai self-language script;
.primitive like urban_newbieland.primitive are for some ai edition ;
.lua are for client ui display ,which run automaticaly according to client commands.

maybe some *.lua are sent to client (by WebIG ,mentioned by sfb,but I am not familiar with this one and havenot found it from code yet,and what is this for ?maybe Expandation of ai display,just guess, ;))

RE: about scripts using - Added by kaetemi almost 7 years ago

The r2 lua scripts are used at client-side to generate ai scripts from the ring editor presets. These are sent to the server when you launch a r2 session. Used by players and event staff, not used for mainland game/story content.

RE: about scripts using - Added by molator almost 7 years ago

The scenarios editor is published but noone yet is able to make it work properly.

RE: about scripts using - Added by kaetemi almost 7 years ago

You need two shards for the scenario editor. A mainland shard (can be a mini shard if you only want the ring) and a ring-specific shard. You can only create characters on the mainland shard, so the SU first has you connect to the FS of an arbitrary mainland shard when you enter character selection. When you choose your character, and go to the ring, you will be assigned an FS of the ring shard to connect to.

RE: about scripts using - Added by erdongchen almost 7 years ago

r2 lua scripts generate ai scripts just for UI,and story are to edit in *.primitive.I can understand these.But if the former one are sent to server,that mean these UI display have some things to do with altering data in services?Otherwise they don't have to send any things to services(my assumption).Maybe I have to see somethings about the r2 session or stuff about that.

It seems like ring shard is just for scenario edition and mainland shard is the one that works for the game.I will look for and see some informations about scenario editor latter.

RE: about scripts using - Added by kaetemi almost 7 years ago

Yes, ring shard is for scenario editor and scenario play, the ring editor lua scripts generates something like a primitive to send to the ring shard. Mainland shard is for game, and uses .primitive files, made with World Editor.

RE: about scripts using - Added by erdongchen almost 7 years ago

scenario editor use ring shard to generate a primitive for real game in Mainland shard (the primitive with some edition ,used by mainland file like newbieland ,which is managed by GPMS).

(1-9/9)