View unanswered posts | View active topics It is currently Thu Mar 28, 2024 3:22 pm



Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
 beginners guide to coding nodes? 
Author Message

Joined: Sat Nov 20, 2010 7:12 am
Posts: 2
Post beginners guide to coding nodes?
I may have a pretty lofty goal here. I'm designing my own modern system and I want to make it very easy to keep track of combat rolls. First problem, I have zero coding experience. I flirted with HTML 10 years ago but it's all gone.

Can anyone direct me to a sort of beginners guide to writing Nodes? I tried searching this forum but it claims node/nodes is too common a word.

When all is said and done, I want to have a node that lets you fill in all the variables (variables that won't change often), and just click 'shoot gun X'. The node would have all the info included, and also subtract the appropriate amount of ammunition from your weapon. If I wanted to get fancy, I could aim for buttons that would do single shot, burst, automatic, etc.

I have no idea what the limitations of python or XML are. Am I aiming too high?


Sat Nov 20, 2010 7:21 am
Profile

Joined: Thu Dec 10, 2009 6:37 am
Posts: 335
Post Re: beginners guide to coding nodes?
Aiming too high? Not at all.

In fact there's been some recent work on OpenRPG 1.8.1 (developer version) which is designed to try and make this sort of thing possible. And what's more I'd be willing to do more work to make anything you want workable and easier to figure out if it doesn't work. Basically I'd like to get to a position where OpenRPG is able to do precisely what you are asking of it.

I am playing D&D 3.5 so a lot of the coding I've added gives a wink to how that system operates but it's all supposed to be very generic. Traipse (the fork) has also had some work in this area, although I would claim it has less.

Unfortunately there's no guide for writing nodes as so few people do it. I'd like to change that. You don't need to know HTNL or Python but a background of familiarity with programing concepts might be useful. Still so far we don't have anything as complex even as an "if" statement or a "loop" so we're talking really basic programing concepts. I'd be happy to work with you on the project in as much as suggesting how to do stuff and seeing where OpenRPG could do with more flexibility.

In passing I'll say that you CAN write entire complex nodes with their own Python code which would work like the Star Wars node for example. That's not what i am talking about. I am talking about the simple nodes you can add to the tree using Features Node (right-click on Gametree in the Tree view and select "Insert Features Node". Open up the node called "Templates" and try double clicking on any of those nodes to create a new node of that type). Alternatively you can copy a node already in the tree using Clone or Clone with Replace.

The best way to get started is to look at what others have done and the best example of that for the very latest system would be my own character sheet for D&D 3.5 -- because I'm almost the only person using this stuff. Me and Paul I think.

Basically I am doing stuff like you list already in a simple way and before I make it more complicated I want feed back. For example when I have a cleric turn undead it subtracts from the number of times the cleric can turn undead each day. Also I have something for tracking HP totals which tend to go up and down.

Anyway you can get my 3.5 D&D character sheet here:
https://www.assembla.com/spaces/openrpg ... JOeJe5cbLr

You will need the latest OpenRPG to work it (and probably including the developer version of 1.8.1)


Mon Nov 22, 2010 5:20 am
Profile

Joined: Sat Nov 20, 2010 7:12 am
Posts: 2
Post Re: beginners guide to coding nodes?
Okay. This'll be a good start. I viewed your sheet in XML format and it scares me. I can't imagine writing up that much code, and I don't quite get what is what. So let's start with some basics. I checked the old Assembla page, and the developer version is what? The one modified last by you on the 24th? And then once I have it, how do I get the sheet into my nodes?


Thu Nov 25, 2010 11:09 am
Profile

Joined: Thu Dec 10, 2009 6:37 am
Posts: 335
Post Re: beginners guide to coding nodes?
A lot of it is repeated sections such as skills which are broadly similar. There's also a feature of the right-click menu on a node in the tree which allows you to copy a node and its contents while replacing a certain amount of text. That's mostly useful for quickly changing the name of the character from "MyName" but you might be able to use it to multiply up a list of skills or attacks or other similar things because you can replace one find word with many replace words and create multiple copies at once. Of course you can also edit the nodes in any xml editor you like and their features could be much better than OpenRPGs for that stuff.

But generally, yes, a fair bit of work, not least because I am always adding little things and a lot of it isn't quite exactly a duplicate such as each skill being based on a different primary attribute.

But that sheet is pretty heavy duty (I have seen one even more involved, for D&D 4th ed, although it might have needed less code with the new features I've added).

You should be able to update to the dev / 1.8.1.0 version using just the updater. You can bring it up by typing in /updater. Select 'dev" and "1.8.1.0" in the drop lists and hit Update Now. Alternatively if theat fails I did put a zip of my version minus a bunch of my own files on the web here:
https://www.assembla.com/spaces/openrpg ... GfeJe5cbLr

But I'd recommend the updater.

To insert a node xml file right click on Game tree in the Game tree view and select "Insert file". If you want to get rid of the whole tree and import a tree xml file then it's "Load New Tree". So you want to chose "Insert File" for that file as it is only a node not a whole tree (with a tree root).

You can find all sort of older nodes which for the most part ought to still work on the new OpenRPG on the web including some far simpler character sheets. For example here:
http://openrpg.wrathof.com/


Fri Nov 26, 2010 6:28 pm
Profile

Joined: Fri Dec 31, 2010 5:30 pm
Posts: 8
Post Re: beginners guide to coding nodes?
I know this thread's about a month old, but I figured this is the best place to ask.

David, I'm also a node coder who limits himself to working exclusively in the gametree, getting back to OpenRPG after a couple of years off. (Been using OpenRPG since about 1.4, my HTML is competent, my Python rudimentary; I just figure that by working with Design instead of hard-coding it, I can get something that'll work everywhere.) I had a few thousand downloads of my assorted character sheets on RPGSheets back when that was up, and I still find variations available on RPGLife and VirtualAdept. The only example I have sitting around right now was last modified in 1.7.7 and developed for St*r W*rs S*g*, but it was based off of an earlier 3.5 sheet (which included psionics and Tome of Battle support; the ToB support evolved into how the sheet handles force powers, and could also tackle 4e with a bit of tweaking). It has rudimentary autocalculation, but no automatic updating. For better or worse, it's available here. (To run multiple instances of it in one gametree, do a find-and-replace on "CS_". Nested references (i.e. !@Name::Abilities@!) used to work, but seemed hit-and-miss, so I had to use this workaround. A cut-down version of that was used for NPCs.)

(For what it's worth, this sheet does everything that Smoothbore wanted except manage ammunition. We tracked that using a modified game status controller plugin with extra fields.)

I'm having trouble finding documentation for how to use the sheet you linked to, as well as how exactly that was created. It looks like it's designed to add context-menus to a mini, which I thought was impossible in OpenRPG (doesn't appear to be listed in any of the changelogs since 1.7.7, the last version I seriously played with). There's other features present - such as using a !@REFNAME@! to refer to something other than a text box, and updating fields in a table based on chat /commands - that I'm totally unfamiliar with, and don't know where to look up more info on. I learned all my advanced node coding by playing around with Design and reading the WrathOf website, but the former isn't documented and the latter's woefully out of date.

If you're still reading this, could you help a guy out and point him to where he could find this info? I'm interested in writing up more advanced nodes for our games, and I'll be quite willing to share them (and even write plain-English tutorials) if people want.


Fri Dec 31, 2010 6:16 pm
Profile

Joined: Thu Dec 10, 2009 6:37 am
Posts: 335
Post Re: beginners guide to coding nodes?
I apologise for my absence.

Context menus were added for my own benefit as a plugin, then I added hooks to the main code which allow any plugin to add generic items to the mini context menu - various examples in the new plugins I've made for the latest version. Some may not work unless you get the latest debug version.

Image

My new references can refer to pretty much anything sensibly you'd want to refer to.

Hmm... i had a huge list of comments on the various new features at some point here...


Fri Jan 07, 2011 6:10 pm
Profile

Joined: Thu Dec 10, 2009 6:37 am
Posts: 335
Post Re: beginners guide to coding nodes?
Here's the old thread;
viewtopic.php?f=4&t=311

There was a lot added and I may have forgotten some of it. I've been less active on OpenRPG over the last few months.


Fri Jan 07, 2011 6:13 pm
Profile

Joined: Thu Dec 10, 2009 6:37 am
Posts: 335
Post Re: beginners guide to coding nodes?
Brief mention of the Debug release:
viewtopic.php?f=4&t=404


Fri Jan 07, 2011 6:14 pm
Profile

Joined: Fri Dec 31, 2010 5:30 pm
Posts: 8
Post Re: beginners guide to coding nodes?
Thank you!

I'll read through what you've linked and see what I can learn. If I think I can help or have other issues, I know where to turn.

(My ability to explore this has been limited, since my gaming group has an OSX user in it that has almost legendary problems in getting OpenRPG installed or updated. We eventually had to resort to getting him to BootCamp it to a Windows partition, where it works, but since that same player's in a separate group that's still on 1.7.6 (and doesn't want to update), he has to stick to 1.7.6 there, meaning exploring the newer options in 1.8 has been... a bit of a minefield. I think I've accidentally corrupted his gametree three times now due to accidentally sharing nodes that had new features in them.)


Sun Jan 09, 2011 12:09 am
Profile

Joined: Thu Dec 10, 2009 6:37 am
Posts: 335
Post Re: beginners guide to coding nodes?
Paul is one of the tech guys here and he uses a Mac. He also uses the most up to date version. He may be able to help with issues about the mac and newer versions.


Fri Jan 14, 2011 4:20 pm
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next


Who is online

Users browsing this forum: No registered users and 28 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by Vjacheslav Trushkin for Free Forums/DivisionCore.