ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Tue Oct 16, 2018 3:43 am

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Mon Jul 25, 2016 5:03 pm 
Offline
Wyrmic

Joined: Tue Feb 15, 2011 12:01 am
Posts: 282
I've created a repository of snippets to speed development of ToME/TE4 when working with Sublime Text :mrgreen:

I understand that Sublime Text is popular with ToME developers - not least of which is DarkGod himself! In my opinion, it's a beautiful text editor and everyone should use it. But we haven't even begun to take advantage of its great customization abilities by creating ToME-specific tools. Let's make it the best editor ever for creating ToME content!

This is only a small initial release, to gather ideas and inspiration. We'll call it an alpha! I'm going to add more to this library as I go along coding normally, as it's quick for me to do so - and now I feel I know all about regexes (after a night of furious doc-reading and bugfixing) I'm ready to apply them to a great many situations!

https://github.com/Nagyhal/ToME-snippets

Here's an example of what you can do:

getTalentRange
input: range <- press tab here
output: self:getTalentRange(t)

input: target <- with text selected, open the "getTalentRange" snippet using the Command Palette.
output: target:getTalentRange(t)

getTalentValue
input: tget <- press tab here
output: local value = t.getValue(self, t) <-enter parameter name in camel case (e.g "Dam", "Dur") and it will be converted into a local variable name in lowercase and underscores.

input: getInitialDam <- with text selected, open the "getTalentRange" snippet using the Command Palette.
output: local initial_dam = t.getInitialDam(self, t)

Anybody is free to create snippets! You can either paste them here for me to upload or upload them to the repository yourself.

I'd also like to know what suggestions people have as to new snippets, and how they think the ones currently uploaded could be improved.

Other snippets I'll complete shortly will include:
  • Talent templates, for various types of talent
  • Effect templates
  • NPC templates
  • Damage type templates
  • etc.
  • Grid-finding routines
  • Basic attack / damage routines
  • Generating as well as referencing talent values


Top
 Profile  
 
PostPosted: Thu Jul 28, 2016 10:19 am 
Offline
Wyrmic

Joined: Tue Feb 15, 2011 12:01 am
Posts: 282
Well, I've just discovered atom.io, an editor which is apparently gaining traction over Sublime due to Sublime's poor developer support.

I still want to make Sublime awesome for ToME, though. Adding new snippets every day! And eventually, we can try and get an autocomplete working...


Top
 Profile  
 
PostPosted: Fri Jul 29, 2016 1:29 pm 
Offline
Master of Eyal

Joined: Wed Jul 24, 2002 9:26 pm
Posts: 10230
Location: Angolwen
One could also say atom is doomed because it's sluggish :)

_________________
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)


Top
 Profile  
 
PostPosted: Thu Aug 18, 2016 11:44 pm 
Offline
Wyrmic

Joined: Tue Feb 15, 2011 12:01 am
Posts: 282
Adding new snippets all the time!

haaaas... Has anybody actually used them?

I'm still looking at creating a dedicated "ToME Tools" package for Sublime Text. That would surely draw a few habitual users, as well as convert a few more people to Sublime Text, I should hope!

Plans:
  • Autocomplete for all engine / class functions
  • On-the-fly autocomplete for all talent / effect / damage type names
  • Extensive snippets to help you create content more quickly
  • Documentation for engine / class functions that appears in the tooltip as you type
  • Toggle for cheat mode on / off
  • Launch or relaunch ToME immediately from the editor
  • Automated testing to some very limited extent


Last edited by Nagyhal on Fri Aug 19, 2016 12:30 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Fri Aug 19, 2016 12:29 am 
Offline
Sher'Tul

Joined: Sun Jun 15, 2014 12:19 am
Posts: 1148
Location: Yeehaw, pardner
I would use one for atom.io. :P

_________________
A little bit of a starters guide written by yours truly here.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 1 guest


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:  
Powered by phpBB® Forum Software © phpBB Group